commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: [Digester] when would I want to setUseContextClassLoader(false)?
Date Sun, 09 Mar 2003 07:41:24 GMT


On Sun, 9 Mar 2003, Brian Topping wrote:

> Date: Sun, 9 Mar 2003 01:46:45 -0500
> From: Brian Topping <topping@digidemic.com>
> Reply-To: Jakarta Commons Users List <commons-user@jakarta.apache.org>
> To: commons-user@jakarta.apache.org
> Subject: [Digester] when would I want to setUseContextClassLoader(false)?
>
> Hi all,
>
> I ran into a project on SourceForge that uses Digester (neat!), but they are
> not calling setUseContextClassLoader(true) when loading up their config.
> Struts seems to have this call and everything works fine on JBoss.  I added
> this call and the other project now works fine too.
>
> It's quite clear to me what using the context class loader instead of the jar
> class loader does, what I am wondering is under what circumstances that the
> class loader would *not* want to be the context class loader.  Any ideas?
>

If the runtime environment is not set up like a servlet container (where
the thread context class loader is the one at the bottom of the class
loader hierarchy), then you might well want to set this to false.  For
using Digester in a webapp, though, you'll almost always want to set it to
true.

> thanks,
>
> Brian

Craig

Mime
View raw message