14.4 System properties specified in the Java application

Organization of this section
(1) Format
(2) Functionality
(3) Specifiable keys
(4) Examples of coding

(1) Format

Specify the system properties in a file with a Win32 batch file format (in Windows) or shell script file format (in UNIX).

(2) Functionality

When you use the vbj command, specify the system properties of the JavaVM that executes the Java application.

When using java.lang.System.setProperty() to define the system properties, you need to define the properties before the corresponding functionality is used for the first time.

If you change the contents of this file while the Java application is running, the changes are applied only when the Java application is started next.

(3) Specifiable keys

The following table lists the keys that can be specified for the vbj command:

Related information is the reference location for information related to the specified key. uCosminexus Application Server is omitted from the manual names.

Table 14-3 System properties specified in the Java applications

ClassificationKey nameTypesSpecifiable/ Not-specifiableRelated information
Common keysejbserver.client.ctm.RequestPrioritySelect
variable
Y

ejbserver.client.ejb.logSelect
variable
Y

ejbserver.client.log.appidSelect
variable
Y

ejbserver.client.log.directorySelect
variable
Y

ejbserver.client.log.lockIntervalSelect
variable
Y

ejbserver.client.log.lockRetryCountSelect
variable
Y

ejbserver.container.rebindpolicySelect
variable
Y

ejbserver.jndi.cacheSelect
variable
Y2.13 Invoking the EJB remote interface in EJB Container Functionality Guide
ejbserver.jndi.cache.intervalSelect
variable
Y

ejbserver.jndi.cache.interval.clear.optionSelect
variable
Y

ejbserver.jndi.namingservice.group.listSelect
variable
Y

ejbserver.jndi.namingservice.group.specify-group-name.providerurlsSelect
variable
Y

ejbserver.jndi.request.timeoutSelect
variable
Y

ejbserver.logger.channels.define.channel-name#.filenumSelect
variable
Y

ejbserver.logger.channels.define.channel-name#.filesizeSelect
variable
Y

ejbserver.logger.enabled.*Select
variable
Y

ejbserver.rmi.request.timeoutSelect
variable
Y

ejbserver.security.service.urlSelect
variable
Y

ejbserver.serverNameVariableY

ejbserver.server.prf.PRFIDSelect
variable
Y

java.naming.factory.initialVariableY

java.naming.provider.urlVariableY

vbroker.orb.htc.comt.entryCountSelect
variable
Y

vbroker.orb.htc.comt.fileCountSelect
variable
Y

vbroker.orb.htc.tracePathSelect
variable
Y

Unique keysejbserver.jndi.log.message.verbosemodeSelect
variable
Y

ejbserver.server.prf.processNameSelect
variable
Y

java.endorsed.dirsVariableN

java.naming.factory.objectFixedY

java.naming.factory.stateFixedY

javax.rmi.CORBA.UtilClassFixedY

javax.rmi.CORBA.StubClassFixedN

javax.rmi.CORBA.PortableRemoteObjectClassFixedY

org.omg.PortableInterceptor.ORBInitializerClass.com.hitachi.software.ejb.security.std.interceptor.SecurityClientInterceptorInitFixedY

java.security.policyFixedY

org.omg.CORBA.ORBClassFixedN

org.omg.CORBA.ORBSingletonClassFixedN

vbroker.agent.enableLocatorSelect
variable
Y

Legend:
Y: You need to specify the key in the command.
N: You need not specify the key in the command.
Blank column: Related information does not exist.
Types
In the case of fixed type, the value for the corresponding key is fixed and must always be specified. In the case of variable type, you need to specify the value according to the system execution environment. In the case of Select variable type, either specify the value according to the system execution environment or do not specify anything.
#
You can set the following names as channel name:
ClientMessageLogFile, ClientExceptionLogFile, or ClientMaintenanceLogFile.
For details on acquiring data, see 2.3 Acquiring data in the manual uCosminexus Application Server Maintenance and Migration Guide.

(a) Common keys

The system property keys are common with the usrconf.properties file for the Java applications.

For details on the common keys, see 14.3 usrconf.properties (User property file for Java applications). You can also see 2.4 usrconf.properties (User property file for J2EE servers), if required.

(b) Unique keys

The unique keys refer to the system property-specific keys.

The details of the unique keys are as follows:

(4) Examples of coding

The examples of coding for the system properties are explained below for each operating system:

(a) In Windows

The following is a coding example of a bat file that starts a Java application. In this example, the vbj command is used to start a Java application. For details on the CLASS_PATH to be specified in the JAR file, see 3.7.4 Setting JAR file to class path of EJB client application in the manual uCosminexus Application Server EJB Container Functionality Guide

For details on environment variables, see Appendix I System Environment Variables in the uCosminexus Application Server Command Reference Guide.

setlocal

rem --- set environment ---
set COSMI_HOME=C:\Program Files\Hitachi\Cosminexus
set SERVERNAME=MyServer
set PRF_HOME=%COSMI_HOME%\PRF
set TPB_HOME=%COSMI_HOME%\TPB
set JAVA_HOME=%COSMI_HOME%\jdk
set VBJ="%TPB_HOME%\bin\vbj"
set VBROKER_ADM=%TPB_HOME%\adm
set PATH=%PRF_HOME%\bin;%TPB_HOME%\bin;%JAVA_HOME%\bin;%PATH%

rem --- set class path ---
set CLASS_PATH=%COSMI_HOME%\TPB\lib\vbjorb.jar
set CLASS_PATH=%CLASS_PATH%;%COSMI_HOME%\TPB\lib\vbsec.jar
set CLASS_PATH=%CLASS_PATH%;%COSMI_HOME%\PRF\lib\cprf.jar
set CLASS_PATH=%CLASS_PATH%;%ProgramFiles%\Hitachi\HNTRLib2\classes\hntrlibMj.jar
set CLASS_PATH=%CLASS_PATH%;%COSMI_HOME%\CC\lib\hitj2ee.jar
set CLASS_PATH=%CLASS_PATH%;%COSMI_HOME%\CC\client\lib\HiEJBClientStatic.jar
set CLASS_PATH=%CLASS_PATH%;stubs.jar
set CLASS_PATH="%CLASS_PATH%;1.jar"

rem --- set properties ---
set PROPS=-Djavax.rmi.CORBA.UtilClass=com.hitachi.software.ejb.rmi.Util
set PROPS=%PROPS% -Djavax.rmi.CORBA.PortableRemoteObjectClass=com.hitachi.software.ejb.rmi.PortableRemoteObject
set PROPS=%PROPS% -Djava.naming.factory.initial=com.hitachi.software.ejb.jndi.InsContextFactory
set PROPS=%PROPS% -Djava.naming.factory.object=com.hitachi.software.ejb.jndi.InsNamingFactory
set PROPS=%PROPS% -Djava.naming.factory.state=com.hitachi.software.ejb.jndi.InsNamingFactory
set PROPS=%PROPS% -Djava.naming.provider.url=corbaname::localhost:900
set PROPS=%PROPS% -Dejbserver.jndi.cache=on
set PROPS=%PROPS% -Dejbserver.jndi.cache.interval=0
set PROPS=%PROPS% -Dejbserver.jndi.cache.interval.clear.option=refresh
set PROPS=%PROPS% -Dejbserver.jndi.request.timeout=0
set PROPS=%PROPS% -Dejbserver.rmi.request.timeout=0
set PROPS=%PROPS% -Dejbserver.serverName=%SERVERNAME%
set PROPS=%PROPS% -Dvbroker.agent.enableLocator=false
set PROPS=%PROPS% -Dorg.omg.PortableInterceptor.ORBInitializerClass.com.hitachi.software.ejb.security.std.interceptor.SecurityClientInterceptorInit=1
set PROPS=%PROPS% "-Djava.security.policy==%COSMI_HOME%\CC\client\cli.policy"
set PROPS=%PROPS% -Dejbserver.server.prf.processName=EJBClient
set PROPS=%PROPS% "-Dejbserver.client.log.directory=%COSMI_HOME%\CC\client\logs"
set PROPS=%PROPS% -Dejbserver.logger.enabled.*=Error

rem --- execute client ---
%VBJ% -VBJclasspath %CLASS_PATH% %PROPS% ConverterClient

endlocal

(b) In UNIX

The following is a coding example of a shell script that starts a Java application. In this example, the vbj command is used to start a Java application.

For details on the environment variables to be specified in CLASS_PATH, see Appendix I System Environment Variables in the uCosminexus Application Server Command Reference Guide.

#!/bin/csh -f

# --- environment ---
set COSMI_HOME=/opt/Cosminexus
set SERVERNAME="MyServer"
set PRF_HOME="${COSMI_HOME}/PRF"
set TPB_HOME="${COSMI_HOME}/TPB"
set JAVA_HOME="${COSMI_HOME}/jdk"
set VBJ="${TPB_HOME}/bin/vbj"
setenv PSALLOC early
setenv NODISCLAIM true
setenv AIXTHREAD_SCOPE S
setenv AIXTHREAD_MUTEX_DEBUG OFF
setenv AIXTHREAD_RWLOCK_DEBUG OFF
setenv AIXTHREAD_COND_DEBUG OFF
setenv EXTSHM ON
setenv LDR_CNTRL MAXDATA=0x40000000
setenv VBROKER_ADM "${TPB_HOME}/adm"
setenv PATH "${JAVA_HOME}/bin:${PATH}"
set LPATH="${TPB_HOME}/lib:${PRF_HOME}/lib"
if ($?LIBPATH) then
       setenv LIBPATH "${LPATH}:${LIBPATH}"
else
       setenv LIBPATH "${LPATH}"
endif

# --- class path ---
set CLASS_PATH="${COSMI_HOME}/TPB/lib/vbjorb.jar"
set CLASS_PATH="${CLASS_PATH}:${COSMI_HOME}/TPB/lib/vbsec.jar"
set CLASS_PATH="${CLASS_PATH}:${COSMI_HOME}/PRF/lib/cprf.jar"
set CLASS_PATH="${CLASS_PATH}:/opt/hitachi/HNTRLib2/classes/hntrlibMj.jar"
set CLASS_PATH="${CLASS_PATH}:${COSMI_HOME}/CC/lib/hitj2ee.jar"
set CLASS_PATH="${CLASS_PATH}:${COSMI_HOME}/CC/client/lib/HiEJBClientStatic.jar"
set CLASS_PATH="${CLASS_PATH}:stubs.jar"
set CLASS_PATH="${CLASS_PATH}:1.jar"

# --- properties ---
set PROPS="-Djavax.rmi.CORBA.UtilClass=com.hitachi.software.ejb.rmi.Util"
set PROPS="${PROPS} -Djavax.rmi.CORBA.PortableRemoteObjectClass=com.hitachi.software.ejb.rmi.PortableRemoteObject"
set PROPS="${PROPS} -Djava.naming.factory.initial=com.hitachi.software.ejb.jndi.InsContextFactory"
set PROPS="${PROPS} -Djava.naming.factory.object=com.hitachi.software.ejb.jndi.InsNamingFactory"
set PROPS="${PROPS} -Djava.naming.factory.state=com.hitachi.software.ejb.jndi.InsNamingFactory"
set PROPS="${PROPS} -Djava.naming.provider.url=corbaname::localhost:900"
set PROPS="${PROPS} -Dejbserver.jndi.cache=on"
set PROPS="${PROPS} -Dejbserver.jndi.cache.interval=0"
set PROPS="${PROPS} -Dejbserver.jndi.cache.interval.clear.option=refresh"
set PROPS="${PROPS} -Dejbserver.jndi.request.timeout=0"
set PROPS="${PROPS} -Dejbserver.rmi.request.timeout=0"
set PROPS="${PROPS} -Dejbserver.serverName=${SERVERNAME}"
set PROPS="${PROPS} -Dvbroker.agent.enableLocator=false"
set PROPS="${PROPS} -Dorg.omg.PortableInterceptor.ORBInitializerClass.com.hitachi.software.ejb.security.std.interceptor.SecurityClientInterceptorInit=1"
set PROPS="${PROPS} -Djava.security.policy==${COSMI_HOME}/CC/client/cli.policy"
set PROPS="${PROPS} -Dejbserver.server.prf.processName=EJBClient"
set PROPS="${PROPS} -Dejbserver.client.log.directory=${COSMI_HOME}/CC/client/logs"

# --- execute client ---
${VBJ} -VBJclasspath ${CLASS_PATH} ${PROPS} ConverterClient