dev@glassfish.java.net

Re: review for issue #7507 - jar file specified with deploy's --libraries not referenceable from webapp

From: Jerome Dochez <Jerome.Dochez_at_Sun.COM>
Date: Thu, 02 Apr 2009 22:22:12 -0700

Hi Dies

You should sync with Sahoo when he is back from vacation but I believe
ClassLoaderHierarchy is where to start investigating a solution -if
necessary- in v3 land.

Thanks, Jerome

On Apr 2, 2009, at 9:49 PM, Dies Koper wrote:

> Hi Siva, Jerome, Kin-Man, Sahoo,
>
> Could you assist me to fix issue #7507?
> (Kin-Man reported a similar issue (#4883) and reported it was fixed,
> but
> may that was just for WAR files, I'm seeing it for EAR files.)
>
> I have attached a fix to the issue. I confirmed it works on V2.1.
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=7507
>
> I changed the following class (who's in charge of this file?).
> glassfish/appserv-core/src/java/com/sun/appserv/server/util/
> ClassLoaderChain.java
>
> Could you review it?
>
> When compiling the JSP, the classpath is taken from the
> WebappClassLoader up. The path specified to the --libraries option is
> kept in ASURLClassLoader, which is held by ClassLoaderChain.
>
> ConnectorClassLoader (extends URLClassLoader)
> |
> ClassLoaderChain (extends SecureClassLoader) <---
> |
> EJBClassLoader (extends URLClassLoader)
> |
> WebappClassLoader (extends URLClassLoader)
> |
> JspLoader (extends URLClassLoader)
>
> The classpath is constructed using URLClassLoader#getURLs but
> ClassLoaderChain does not extend URLClassLoader so the path can't be
> obtained that way, and it provides no method to obtain the URLs from
> the
> classloader it holds.
> The proposed patch offers that method.
>
>
> This class has been refactored out in V3. Where would I put these
> methods to make it work for GF V3 too?
>
> Thanks,
> Dies
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>