[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: JBMICROCONT-100, lifecycle dispatch thread context class

scott.stark@jboss.org do-not-reply at jboss.com
Wed Aug 9 23:05:58 EDT 2006


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.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964224#3964224

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964224



More information about the jboss-dev-forums mailing list