ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | oscar List | Febuary 2005 Index

<--  Date Index  --> <--  Thread Index  -->

Re: [oscar] Class Loading


Rob Walker wrote,
> This does look tidier - but it assumes your '//do stuff...' block
> entails all of the class instantiations and actions that would test
> the context class loader and make use of it.

Other than Marcel's suggestion of using a private thread, there's really 
no other way to do it which allows you to mix multiple independently 
developed packages each of which wants to mess with the context 
classloader.

> We've encountered cases where it doesn't and the above may not work.

I'm struggling to see what reasonable behaviour could cause the 
save-and-restore-in-finally idiom to fail. About the only thing I can 
think of would be the "do stuff" saving Thread.currentThread, then 
reading that Thread's context classloader from another thread and 
expecting the result to be stable ... but I'd class that as totally 
broken rather than reasonable behaviour.

Cheers,


Miles



<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.