dev@glassfish.java.net

Re: libraries added to classpath when using deploy subcommand's --precompilejsp option

From: Kin-man Chung <Kin-Man.Chung_at_Sun.COM>
Date: Tue, 21 Apr 2009 17:45:57 -0700

Perfect timing, Dies. :-) Hong did a commit this morning to take out
<display-name stuff>. See version 26493 at

http://fisheye4.atlassian.com/browse/glassfish-svn/trunk/v3/deployment

As for V2.1, I wouldn't worry about it, since it already works, though
less perfect. I am not too familiar with part anyway.

On 04/21/09 17:00, Dies Koper wrote:
> Hi Siva, Kin-man,
>
> I have a question about a piece of code in GF V2.1's ASClassLoaderUtil.java.
>
> When using the deploy subcommand's --precompilejsp option, the following
> method looks up the libraries specified to the --libraries option.
> com.sun.appserv.server.util.ASClassLoaderUtil#getWebModuleClassPath(String)
>
> The way it does that seems to depend on whether you're compiling an EAR
> or WAR file:
>
> In case of an EAR:
> It obtains the <display-name> from application.xml, and uses this as
> key to search all deployed WAR files and for each match adds the jar
> files that were set for it to the classpath.
>
> In case of a WAR:
> It obtains the module's destination path
> (("C:glassfish\domains\domain1\applications\j2ee-modules\sample"),
> converts '\'s to '-'s, and uses that as key to search all deployed WAR
> files and for each match adds the jar files that were set for it to the
> classpath.
>
> Is it supposed to be relying on the <display-name> value?
>
> It seems the --libraries are already obtained and passed to the
> JSPCompiler#compile method's classpathList argument, so is the above
> processing in that method really needed?
>
> I also had a look at the V3 source but this class has been refactored so
> I'm not sure whether it has been taken out or just moved elsewhere.
> Taking it out would be the right approach, wouldn't it?
>
> Thanks,
> Dies
>
>