This content has been marked as final.
Show 5 replies
-
1. Re: JBMICROCONT-100, lifecycle dispatch thread context class
starksm64 Aug 9, 2006 11:05 PM (in response to starksm64)Adding the following code to the installAction does solve the problem.
// Dispatch the joinpoint using the target class loader joinpoint.setTarget(target); ClassLoader tcl = Thread.currentThread().getContextClassLoader(); try { if( cl != null ) Thread.currentThread().setContextClassLoader(cl); dispatchJoinPoint(context, joinpoint); } finally { if( cl != null ) Thread.currentThread().setContextClassLoader(tcl); }
I checked this in with similar additions to the uninstallAction. If this looks fine I'll close the issue tomorrow. -
2. Re: JBMICROCONT-100, lifecycle dispatch thread context class
adrian.brock Aug 10, 2006 3:28 PM (in response to starksm64)This should really be done for all callouts to the bean.
i.e. it should be in
KernelControllerContextAction::dispatchJoinPoint() -
3. Re: JBMICROCONT-100, lifecycle dispatch thread context class
starksm64 Aug 10, 2006 4:27 PM (in response to starksm64)Then shouldn't that protected method have its signature changed to accept the target ClassLoader?
-
4. Re: JBMICROCONT-100, lifecycle dispatch thread context class
adrian.brock Aug 10, 2006 4:39 PM (in response to starksm64)Why? When you can do:
BeanMetaData metaData = context.getBeanMetaData(); ClassLoader cl = Configurator.getClassLoader(metaData);
-
5. Re: JBMICROCONT-100, lifecycle dispatch thread context class
starksm64 Aug 10, 2006 4:55 PM (in response to starksm64)Because that is already done in LifecycleAction, and 50% of the current callers. In the ConfigureAction.setAttributes we are looping over the same context/target so why have to do this lookup repeatedly?