Chapter 28 Configuring Custom Java Class Lists
A Java component's implementation class and stub classes are automatically part of the custom class list for the component. Add the following additional classes to the custom list:
JAR files and classes must be deployed in the EAServer java/classes subdirectory.
JNDI classes
The standard Java Naming and Directory (JNDI) packages are
never custom loaded. In EAServer versions prior to 4.0, an EJB component required
the following in the custom class list:
com.sybase.ejb.*;javax.naming.*;javax.naming.spi.*In EAServer 4.0 and later, these classes and interfaces are always loaded by the system class loader. If listed in the custom class list, these classes and interfaces are ignored.
When an EJB 2.0 component provides local interfaces, any other component or Web application that calls the local interface must use the same class loader. ClassCastException errors occur when local interface calls are made from entities that use a different class loader.
For EJB components deployed from the same EJB-JAR files, the importer adds the component classes to the Java Classes setting of the EAServer package. This configuration ensures that local interfaces can be used for calls between components in the package.
For components in different packages, or Web applications that use EJB local interfaces, you must configure class loading at the application or server level to ensure the component and caller use the same class loader for the component classes. For components and Web applications that are in the same application, you can use the application class loader, otherwise use the server class loader. Copy the component's Java Classes tab settings to the Java Classes tab in the Application Properties or Server Properties dialog box.
A Web application's custom class list must include any classes that must be reloaded when the Web application is refreshed. For example, servlet implementation classes, utility classes called by servlets and JSPs, and stub classes for component invocations should be in the custom class list.
If you deploy classes and JAR files that the standard Web application deployment locations, you do not need to explicitly list them in the custom class list. The standard Web application deployment locations are:
These are subdirectories of the Web application's context root. In your EAServer installation, the context root is:
Repository/WebApplication/WebAppWhere WebApp is the Web application name.
Classes and JAR files that are deployed in the standard locations need not be explicitly listed in the custom class list. However, you may want to use classes or JAR files from the EAServer java/classes subdirectory. For example, if your servlet calls Java components, you may want the applications and components to use the same copies of the component stubs.
Classes that are not loaded from the standard Web application deployment directories must be explicitly listed in the custom class list; otherwise the server attempts to load them with the system class loader.
For servlets that are installed directly in a server, and not in a Web application, you must define the custom class list in the serlvet properties or the properties of the host server. Classes and JAR files for these servlets must be deployed in the EAServer java/classes subdirectory.
Copyright © 2002 Sybase, Inc. All rights reserved. |
![]() |