uCosminexus Application Server, Expansion Guide
The output of the user logs on EJB client applications is performed with the following procedure:
This section describes the contents of each processing along with the procedure.
The system properties for the user log functionality of EJB client applications are set by using a configuration file.
The properties that can be set in the system properties are the keys starting with ejbserver.application.userlog, from among the properties that can be specified in usrconf.properties for J2EE servers. An example of a setting is as follows:
# user-log handler function ejbserver.application.userlog.CJLogHandler.conf1.appname=my_app1 ejbserver.application.userlog.CJLogHandler.conf1.path=application1/logfileA ejbserver.application.userlog.CJLogHandler.conf1.limit=10485760 ejbserver.application.userlog.CJLogHandler.conf1.count=2 ejbserver.application.userlog.CJLogHandler.conf1.level=SEVERE # user-log logger function ejbserver.application.userlog.Logger.com.example.userlogger1.handlers=com.hitachi.software.ejb.application.userlog.CJMPMessageFileHandler;conf1 ejbserver.application.userlog.Logger.com.example.userlogger1.useParentHandlers=true ejbserver.application.userlog.Logger.com.example.userlogger1.level=INFO ejbserver.application.userlog.loggers=com.example.userlogger1 |
In an EJB client application, you can specify CJMPMessageFileHandler or CJMessageFileHandler as a handler used for the user log output. You specify the handler to be used, in the ejbserver.application.userlog.Logger.logger-name.handlers key. In the example, the CJMPMessageFileHandler class is specified in the userlogger1 logger.
CJMPMessageFileHandler is a handler, which contains the functionality that enables the concurrent output of logs from multiple processes to the same file. This enables you to collect and output the user logs output by multiple processes of an EJB client application. You can use this handler only for the EJB client application.
If you do not want to concurrently output logs from multiple processes to the same file, you can also use same CJMessageFileHandler as in the case of the user log output of J2EE applications. If you use CJMessageFileHandler, the log output performance is higher as compared to the case where CJMPMessageFileHandler is used.
A log system is set up by invoking the method that initializes the EJB client functionality. The EJB client functionality is initialized at one of the following timings:
In the processing in application, the Java logging API is executed and a user log is output. When using CJMPMessageFileHandler, note the following points:
All Rights Reserved. Copyright (C) 2013, 2015, Hitachi, Ltd.