Which classes are loaded by the custom loader?
In order to allow hot refresh, class references in your servlet and JSP code must be resolved by EAServer's custom class loader.

Classes loaded by the system class loader Class instances loaded by the system class loader cannot be refreshed. Class instances loaded by the custom class loader cannot be assigned to references loaded by the system class loader, or vice-versa.

Most all references will be resolved by the custom loader. The exceptions are references made with class loader calls with an explicit reference to the system class loader or another custom class loader. The following class references are all resolved by the custom class loader when they occur in servlet code:

Classes referenced by import statements and declarations.
Classes loaded dynamically using Class.forName(String). For example:
obj = Class.forName("com.foo.MyClass");

Classes loaded by explicitly calling the java.lang.ClassLoader associated with the servlet instance, which can be retrieved with this code (this refers to the servlet instance):
ClassLoader loader = this.getClassLoader();

0 comments: