geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Mulder <>
Subject Re: Connector Work ClassLoader
Date Sun, 03 Oct 2004 18:56:42 GMT
On Sun, 3 Oct 2004, David Jencks wrote:
> At the moment, the only way I see to implement this would be to supply 
> a separate WorkManager instance to each ResourceAdapter that could 
> associate the RA classloader with the work request.

	Couldn't the implementation go like this (in

ClassLoader before = Thread.currentThread().getContextClassLoader();
try {
} finally {

	The speed issue, well, I guess that's a more significant problem.  
If it's not slow to *read* the TCCL, we may want to do something like the
above as a defensive measure -- reset the TCCL to the proper one if the
Work changes it without changing it back.  So we'd only record the
existing (or desired) CL before invoking, and we'd put an
"if(Thread.cT().getCCL() != before)" before resetting it in the finally


> Aside from the extreme slowness Dain mentioned, I don't see how to
> implement this proposal without a major rewriting of the WorkManager.  
> Nothing else in connector-land executes with the TCCL set to the
> connector's classloader, so I'm not really seeing why the Work
> submissions should.

View raw message