users@glassfish.java.net

Re: Webapp deployment questions

From: Hong Zhang <hong.hz.zhang_at_oracle.com>
Date: Tue, 06 Apr 2010 12:08:29 -0400

Hi, Sean
> So these are probably dumb questions but I’ll ask anyway.. with
> respect to Glassfish:
>
> Question 1:
>
> 1. Scenario: I have a clustered instance CI1 that only syncs at
> RESTART.
> 2. I deploy two apps to the DAS with CI1 as the target
> 3. I restart CI1
>
>
> Are those apps deployed by CI1 in parallel or is it serial (that is
> app1 is deployed to CI1, then app 2 is deployed)?
>
Yes, the loading of the applications is done sequentially. It reads the
domain.xml for application entries which are relevant to this instance,
and load them one by one sequentially.
> Question 2:
> If the answer to 1 is “serial”, is there a way to control the ordering
> of web app deployment (something similar to how servlet
> load-on-startup param works) in this scenario?
There is no official mechanism to control the ordering of the web app
deployment. However, in the current implementation, the applications
will be loaded by the order they were deployed. So if app1 is deployed
to DAS first (which means the application entry for it will be inserted
before app2), it should be loaded first.

- Hong