code: public static <V> V doWithClassLoader( final ClassLoader classLoader, final Callable<V> callable )
          throws Exception
      {
          Thread currentThread = null;
          ClassLoader backupClassLoader = null;
          try
          {
              if( classLoader != null )
              {
                  currentThread = Thread.currentThread();
                  backupClassLoader = currentThread.getContextClassLoader();
                  currentThread.setContextClassLoader( classLoader );
              }
              return callable.call();
          }
          finally
          {
              if( classLoader != null )
              {
                  currentThread.setContextClassLoader( backupClassLoader );
              }
          }
      }
docs: Executes a piece of code (callable.call) using a specific class loader set as context class loader.
  If the curent thread context clas loader is already set, it will be restored after execution.
  
  @param classLoader clas loader to be used as context clas loader during call.
  @param callable    piece of code to be executed using the clas loader
  
  @return return from callable
  
  @throws Exception re-thrown from callable