This subsection describes the settings for using the container extension library. Note that if the container extension library uses the JNI, use the server start and stop hook functionality.
To use the container extension library, you must specify the following settings:
- Create the JAR file for the container extension library.
For details on using the container extension library, see 14.2 Using the container extension library.
- Specify the following parameter in the <configuration> tag of the logical J2EE server (j2ee-server) in the Easy Setup definition file:
- add.class.path
In the value set up for add.class.path, specify the path of the JAR file created in 1 as the system class path of the J2EE server.
Set add.class.path in the extension parameter of the J2EE server in the Easy Setup definition file.
- To use the JNI functionality from the container extension library, specify the following parameter in the <configuration> tag of the logical J2EE server (j2ee-server) in the Easy Setup definition file:
- add.library.path
In the value set up for add.library.path, specify the search path of the JNI library.
- ejbserver.application.InitTermProcessClasses
In the value set up for ejbserver.application.InitTermProcessClasses, specify the class name of the server start and stop hook functionality.
Set add.library.path and ejbserver.application.InitTermProcessClasses in the extension parameters of the J2EE server in the Easy Setup definition file.
- Specify the JAR file for the container extension library in the key of the server management command file.
The file and key to be specified differ according to the OS.
- In Windows
USRCONF_JVM_CLASSPATH key of usrconf.bat
- In UNIX
USRCONF_JVM_CLPATH key of usrconf
- To use the JNI functionality from the container extension library, specify the search path of the JNI library in the key of the server management command file.
To specify multiple search paths, demarcate with semicolons (;).
The file to be specified differs according to the OS (the key is common).
- In Windows
USRCONF_JVM_LIBPATH key of usrconf.bat
- In UNIX
USRCONF_JVM_LIBPATH key of usrconf
For details on the files, see 4.6 Easy Setup definition file and 5.3 usrconf.bat (Option definition file for server management commands) in the uCosminexus Application Server Definition Reference Guide.
The following is an example of the settings for the Easy Setup definition file and the user-defined files. In this example, the JAR file of the container extension library is extended_container.jar and the container extension library uses the JNI to invoke extended_container.dll (in UNIX, extended_container).
- In Windows
- Example of the settings for the Easy Setup definition file
<configuration>
<logical-server-type>j2ee-server</logical-server-type>
<param>
<param-name>add.class.path</param-name>
<param-value>c:\jar\extended_container.jar</param-value>
<param-name>add.library.path</param-name>
<param-value>c:\lib</param-value>
</param>
:
</configuration> |
- Example of the settings for usrconf.bat used for the server management commands
rem system classpath
set USRCONF_JVM_CLASSPATH=c:\jar\extended_container.jar
rem library path
set USRCONF_JVM_LIBPATH=c:\lib |
- In UNIX
- Example of the settings for the Easy Setup definition file
<configuration>
<logical-server-type>j2ee-server</logical-server-type>
<param>
<param-name>add.class.path</param-name>
<param-value>/work/classes/extended_container.jar</param-value>
<param-name>add.library.path</param-name>
<param-value>/work/lib</param-value>
</param>
:
</configuration> |
- Example of the settings for usrconf used for the server management commands
#!/bin/csh -f
# system classpath
set USRCONF_JVM_CLPATH=/work/classes/extended_container.jar
# library path
set USRCONF_JVM_LIBPATH=/work/lib |