@Override
  public Class<?> resolveClass(ObjectStreamClass desc) throws ClassNotFoundException {
    Class<?> theClass;
    try {
      theClass = Class.forName(desc.getName(), false, loader);
    } catch (ClassNotFoundException cnfe) {
      theClass = Thread.currentThread().getContextClassLoader().loadClass(desc.getName());
    }
    return theClass;
  }
This class is used when session attributes need to be reconstructed with a new classloader.
extensions/geode-modules/src/main/java/org/apache/geode/modules/util/ClassLoaderObjectInputStream.java