When you use the local call optimization functionality, the class loader configuration differs from the default class loader. The local call optimization functionality enables the invocation of the Enterprise Beans of other applications at a high speed.
To use the local call optimization functionality, specify the following settings in the user-defined file for the J2EE servers (Cosminexus-installation-directory\CC\server\usrconf\ejb\server-name\usrconf.properties):
ejbserver.rmi.localinvocation.scope=all
The class loader configuration for local call optimization is as follows:
Figure B-2 Class loader configuration for local call optimization
![[Figure]](figure/zu0b0200.gif)
The contents of the class loaders are as follows:
- System class loader
The system class loader loads the classes provided by the Cosminexus components.
Generation time: When a J2EE server starts
Destruction time: When a J2EE server stops
- Connector class loader
The connector class loader loads the classes included in an individually deployed resource adapter. Only one connector class loader exists in the J2EE server.
Generation time: When a J2EE server starts
Destruction time: When a J2EE server stops
- JavaBeans class loader
The JavaBeans class loader loads the classes of the JavaBeans resources.
Generation time: When a J2EE server starts
Destruction time: When a J2EE server stops
- J2EE container class loader
The J2EE container class loader becomes the parent class loader of all the application class loaders and sets the class path of all the application class loaders. Only one J2EE container class loader exists in a J2EE server.
Generation time: When a J2EE server starts
Destruction time: When a J2EE server stops
- Application class loader
The application class loader has in the class path the classes included in the EJB-JAR, library JAR, and resource adapters existing in the application. There is an application class loader for each application. During local call optimization, the class path of the application class loaders is also set in the J2EE container class loader that forms the parent class loader; therefore, no classes are loaded with this class loader. The class name is com.hitachi.software.ejb.server.ApplicationClassLoader.
- Generation time: When a J2EE application starts
KDJE42143-I is output to cjmessage?.log (J2EE server operation log) (? indicates the number of log files).
- Destruction time: When a J2EE application stops
KDJE42144-I is output to cjmessage?.log (J2EE server operation log) (? indicates the number of log files).
- Web Application class loader
The Web application class loader loads the classes included in a WAR file within a J2EE application. There is a Web application class loader for each WAR file. The class name is org.apache.catalina.loader.WebappClassLoader.
- Generation time: When a J2EE application starts (When a Web application starts)
KDJE39219-I is output to cjmessage?.log (J2EE server operation log) (? indicates the number of log files).
- Destruction time: When a J2EE application stops (When a Web application stops)
KDJE39220-I is output to cjmessage?.log (J2EE server operation log) (? indicates the number of log files).
- JSP class loader
The JSP class loader loads the classes generated when the JSP files and tag files are compiled. There is a JSP class loader for each JSP.
- Generation time: When a JSP class is loaded
- Destruction time: When a J2EE application stops (When a Web application stops)
For the notes on the destruction of a class loader, see Appendix B.1 Default class loader configuration.
- Hint
- Loading a resource adapter
- A resource adapter deployed as a J2EE resource adapter is loaded using the connector class loader. A resource adapter that is included and used in a J2EE application is loaded using the application class loader.
- Note
- Note the following points when you set ejbserver.rmi.localinvocation.scope=all in the property:
- The EJB-JARs and library JARs of the J2EE application are loaded using the same class loader, so the classes with the same name are shared between the J2EE applications. If the classes with the same name, but different contents exist, only the class loaded first is enabled as per the Java specifications. Note that the classes in a WAR file are loaded using the class loaders existing for the WAR files, so these classes are not shared.
- To replace the EJB-JARs and library JARs of a J2EE application, stop the J2EE application and then restart the J2EE server. The settings will be enabled after restart.