Hitachi

uCosminexus Application Server Expansion Guide


8.7.2 Using container extension library

In this method, you specify the class name of the user-created classes of the Filter class, Formatter class, or Handler class type in the property key of the user log functionality, build a log configuration containing the user-created class, when starting a J2EE server, and then use the class. This method differs from the J2EE standard method.

You specify a JAR file, containing the user-created class, as a container extension library and specify the class path to the created library. As a result, when you start the J2EE server, the CJMessageFileHandler class specified in the property key, formatter and filter are created and executed, enabling you to build a log configuration.

The procedure is as follows:

  1. Create a JAR file (container extension library JAR) containing the user-created classes of the Formatter class, Filter class and Handler class type.

    Here, the file name is set as myloglib.jar.

  2. Place myloglib.jar at any location.

    Here, the description is given based on the prerequisite that myloglib.jar is placed at the following location:

    • In Windows

      c:\mylib

    • In UNIX

      /usr/mylib

  3. Specify the class path to the placed library.

    For example, in the case of a J2EE server, you specify the following settings in usrconf.cfg (option definition file):

    • In Windows

      add.class.path=C:\mylib\myloglib.jar

    • In UNIX

      add.class.path=/usr/mylib/myloglib.jar

  4. In the property key for the user log functionality of usrconf.properties (user property file), you specify the full class name containing the package name.