Configuring custom class loaders

When you deploy entities from J2EE archives, EAServer creates a class loader to match the entity name and configures the entities to use the new class loader. You can configure class loaders using the Management Console or an Ant configuration script.

StepsConfiguring class loaders in the Management Console

  1. Connect to the server with the Management Console—see Chapter 2, “Management Console Overview.”

  2. Expand the Class Loaders folder. Existing class loader definitions display.

    Table 10-1 describes the class loader properties.

StepsUsing Ant to configure class loaders

  1. Create an Ant configuration file or identify one already in your project where you can add the class loader configuration to the configure target. For more information, see Chapter 2, “Ant-Based Configuration,” in the EAServer Automated Configuration Guide.

  2. Add or configure the class loader by invoking the setProperties task from the configure or configure-user target. For example:

    <setProperties classLoader="ejbjar-sample"> 
       <property name="classPath" value="~/ejbjars/*.jar"/> 
       <property name=”parentFist” value=”true”/> 
       <property name=”parentClassLoader” value=”app-sample”/> 
       <property name="classloaderImpl" value="com.sybase.djc.util.NamedClassLoader"/> 
    </setProperties> 
    

    Table 10-1 describes the class loader properties.