src/main/java/org/jboss/util/loading/ContextClassLoaderSwitcher.java
public void setContextClassLoader(final Thread thread, final ClassLoader cl)
   {
      AccessController.doPrivileged(new PrivilegedAction()
      {
         public Object run()
         {
            thread.setContextClassLoader(cl);
            return null;
         }
      });
   }
public void setContextClassLoader(final Thread thread, final ClassLoader cl)
   {
      AccessController.doPrivileged(new PrivilegedAction()
      {
         public Object run()
         {
            thread.setContextClassLoader(cl);
            return null;
         }
      });
   }
public void setContextClassLoader ( final Thread thread , final ClassLoader cl ) { AccessController . doPrivileged ( new PrivilegedAction ( ) { public Object run ( ) { thread . setContextClassLoader ( cl ) ; return null ; } } ) ; }
Set the context classloader for the given thread

@param thread the thread
@param cl the new context classloader
Set the context classloader for the given thread