You can configure the package, application, or server level class lists to configure sharing of class instances between child entities installed in the package, application, or server. Doing so can decrease server memory use by eliminating copies of custom loaded classes. However, you must also refresh the classes at the level where they are loaded. For example, classes loaded at the server level require a refresh of the entire server.
To configure sharing of custom-loaded classes, first configure the class lists for the Web applications and components that use the class directly, then configure the same entries in the parent entries up to a common ancestor. Make sure the class loader delegation policy is Parent First for entities below this common ancestor. For example, Figure 30-2 shows the entries required to share classes in the JAR file widget.jar and the Java package com.sybase.widgets, loading one copy of the classes at the application level.
Figure 30-2: Example of sharing custom loaded classes
Deploy classes that are shared by multiple entities in one of these common locations:
The java/classes subdirectory, for JAR files that are always custom-loaded (unless you have added the JAR file to the server CLASSPATH setting by listing it in the com.sybase.jaguar.server.jvm.classpath or com.sybase.jaguar.server.jvm.bootclasspath server property).
The java/lib subdirectory, for JAR files that may be system loaded or custom loaded. If an entity’s custom class list contains the JAR file name, the classes are custom loaded. Otherwise, the classes are system loaded, because EAServer adds JAR files in this location to the default server class path at server start-up time.
The class tree rooted in the java/classes or html/classes subdirectory, for class files such as generated EJB stub classes. Use java/classes for server-side code. Use html/classes if the classes are shared with applet clients that load class files directly rather than using a JAR file.
To configure the server, application, or package class list, follow the instructions in “Configuring an entity’s custom class list”.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |