commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <>
Subject Re: Betwixt : Class Loader - Food for thought
Date Sun, 20 Nov 2005 19:24:18 GMT
On Sun, 2005-11-20 at 19:07 +0100, Thomas Dudziak wrote:
> On 11/20/05, Ryan McGuinness <> wrote:
> > I have been trying to get betwixt running with the IBM JDK within
> > WebSphere. While sifting through the source, I noticed that each
> > class that deals with loading classes does something a little
> > different. Should there be a Utility class to handle this.
> +1


having experienced the vast differences that can happen when faced with
running bricks in different environments, what's really needed is a
configurable strategy for class loading with probably two base
implementations (one aimed at application work, one for J2EE

ryan: if you've already sifted through the source, perhaps you might
contribute a patch which tidies up all the classloading into a single

> > Also, in more secure containers, it may be a good idea to get the
> > class loader a little differently:
> > Below is a code snip-it on getting the loader through the Security
> > Manager.
> why so complicated ? 
> Wouldn't it suffice to first check the context
> class loader at the current thread
> Thread.currentThread().getContextClassLoader()
> is available, and if not, then using the one that loaded the current class
> getClass().getClassLoader()

the above is the usual basic (a few details are missing) procedure when
running in a J2EE container. 

i'm not sure that i understand the reasons behind the complex procedure
above. could you explain it?

- robert

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message