admin@glassfish.java.net

Re: syncing applications

From: Hong Zhang <hong.hz.zhang_at_oracle.com>
Date: Wed, 07 Apr 2010 20:45:46 -0400

Hi, Bill
  Sorry for the late reply. For some reason, I missed this thread earlier.
>> I've got some simple prototype syncing working for config files.
>> Now I'm thinking about applications. Some questions...
>>
>> Given the name of an application (i.e., the name of a directory
>> under the "applications" directory), how do I find the original
>> application archive on the server?
> I assume we're not saving the original archive yet.
Currently we delete the uploaded archive at the end of the deployment.
There were some previous discussions with Kedar on this, basically we
should be able to leave the archive alone during deployment and only
delete it when undeploying the application. And when we do the archive
uploading for the deployment, we could store the file at a designated
area instead of the temp directory so it's easier to retrieve the
archive for synchronization purpose. Do you have any
suggestion/preference as to where the uploaded archive should be stored?
> In the mean time
> I'm just synchronizing all the files from the application directory
> recursively.
>
>> And how do I find all the "generated" content that goes with the
>> application?
>
> I found the methods I need in ServerEnvironment.
>
Yes, that's the right place.
>> Given an application archive, are there any utility classes to
>> extract the archive on the client?
>
> If we move to shipping the original archive instead of all the
> individual files, I'll still need this.
v3/common/internal-api/src/main/java/org/glassfish/internal/deployment/GenericHandler.expand
is how we expand the archive on server side. We could extract the logic
here and put it in a utility method and shared between server and client.
>> And finally, I'm eventually going to need a method that, given a
>> server instance name, returns a list of all the applications that
>> should be available to that server. Anyone want to write it? :-)
> I guess this can wait until we have target and instance support.
This should be pretty straightforward to write. I can take care of it.
When you say return a list of all the applications, did you want it to
return List<Application> where Application class is the Application
config bean class in admin/config-api directory?

Thanks,

- Hong
>
> At this point I've got basic application synchronization working,
> although I'm waiting for some improvements from Tim.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>