src/main/java/org/jboss/util/stream/MarshalledValueInputStream.java
protected Class<?> resolveClass(ObjectStreamClass v)
         throws IOException, ClassNotFoundException
   {
      ClassLoader loader = Thread.currentThread().getContextClassLoader();
      String className = v.getName();
      try
      {
         // JDK 6, by default, only supports array types (ex. [[B)  using Class.forName()
         return Class.forName(className, false, loader);
      }
      catch (ClassNotFoundException cnfe)
      {
         Class cl = primClasses.get(className);
         if (cl == null)
            throw cnfe;
         else
            return cl;
      }
   }
protected Class<?> resolveClass(ObjectStreamClass v)
         throws IOException, ClassNotFoundException
   {
      ClassLoader loader = Thread.currentThread().getContextClassLoader();
      String className = v.getName();
      try
      {
         // JDK 6, by default, only supports array types (ex. [[B)  using Class.forName()
         return Class.forName(className, false, loader);
      }
      catch (ClassNotFoundException cnfe)
      {
         Class cl = primClasses.get(className);
         if (cl == null)
            throw cnfe;
         else
            return cl;
      }
   }
protected Class < ? > resolveClass ( ObjectStreamClass v ) throws IOException , ClassNotFoundException { ClassLoader loader = Thread . currentThread ( ) . getContextClassLoader ( ) ; String className = v . getName ( ) ; try { // JDK 6, by default, only supports array types (ex. [[B)  using Class.forName() return Class . forName ( className , false , loader ) ; } catch ( ClassNotFoundException cnfe ) { Class cl = primClasses . get ( className ) ; if ( cl == null ) throw cnfe ; else return cl ; } }
Use the thread context class loader to resolve the class

@throws java.io.IOException Any exception thrown by the underlying OutputStream.
Use the thread context class loader to resolve the class