commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <>
Subject Re: [beanutils] default converters for File and URL?
Date Fri, 04 Apr 2003 16:28:28 GMT
On Friday, April 4, 2003, at 04:29 PM, James Strachan wrote:

> On Friday, April 4, 2003, at 04:04 PM, Joe Germuska wrote:


>> I'm not sure I understand all of the precedence rules -- is this how it 
>> works?  Each ClassLoader has one instance of a Class object for 
>> ConvertUtils, and that object is ultimately where the registered 
>> converters are stored.  So as long as I don't load ConvertUtils with a 
>> shared ClassLoader, there is no risk?  So then, since I'm usually using 
>> the BeanUtils package from a web application's WEB-INF/lib, the 
>> conversions should only be visible within that web app.
> Agreed. Unless commons-beanutils gets into the system ClassLoader :)
> It'd be a good idea to use the instance based converter repositories to 
> avoid this.

at the moment, the static utility classes are backed by singleton 
instances. the plan is to replace this system by using an instance per 
context class loader. this should gaurantee independence between web apps.

i've been busy and need some more time to think about what craig said on 
this subject and i'm also considering whether to use a WeakHashMap (this 
would allow the context classloader and associated instance to be garbage 
collected) but hopefully i'll have some more time over the next few weeks 
so it looks like getting done sooner or later.

any wisdom on this subject would be gratefully received :)

- robert

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

View raw message