users@glassfish.java.net

Re: War deployment question

From: Hong Zhang <Hong.Zhang_at_Sun.COM>
Date: Mon, 10 Aug 2009 16:56:09 -0400

Yes, we always start from scratch for redeployment to avoid any side
effect of the left over bits.
It seems you could use directory deployment where you own the
"application" directory, and you can just modify or add to the files you
have in there.

> When I execute asadmin deploy myApp.war, it seems that that the
> corresponding directory ($GF_HOME/applications/j2ee-modules/myApp) is
> always deleted before asadmin unzips my war there once again.
>
> Is there a way to prevent this from happening?
>
> That is I just want the contents of my war to overlay what is already
> in $GF_HOME/applications/j2ee-modules/myApp... I do NOT want that
> directory deleted.
>
> This is b/c I have JSP-like template classes that take a loooonnnnng
> time to generate that are stored in (for example)
> $GF_HOME/applications/j2ee-modules/myApp/WEB-INF/myTemplateClasses.
>
> Since asadmin deploy always deletes the entire myApp directory, every
> time I deploy a small change to my war it takes an hour to restart b/c
> the JSP-like pages have to be re-compiled.
>
> I thought maybe asadmin deploy --force=true might do what I wanted but
> doesn't seem to.
>
> Any ideas?
>
> --
> Sean Comerford, Software Engineer
> ESPN.com Site Architecture Group
> Office: 860.766.6454 Cell: 860.951.6973