Example #1
0
  /**
   * Undeployment callback invoked when class loader is being undeployed.
   *
   * <p>Some marshallers may want to clean their internal state that uses the undeployed class
   * loader somehow.
   *
   * @param ldr Class loader being undeployed.
   */
  public void onUndeploy(ClassLoader ldr) {
    for (Class<?> cls : descByCls.keySet()) {
      if (ldr.equals(cls.getClassLoader())) descByCls.remove(cls);
    }

    U.clearClassCache(ldr);
  }