Hitachi

uCosminexus Application Server Definition Reference Guide


12.2.3 System properties specified in the Java application

Organization of this subsection

(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 12‒3: System properties specified in the Java applications

Classification

Key name

Types

Specifiable/ Not-specifiable

Related information

Common keys

ejbserver.client.ctm.RequestPriority

Select

variable

Y

ejbserver.client.ejb.log

Select

variable

Y

ejbserver.client.log.appid

Select

variable

Y

ejbserver.client.log.directory

Select

variable

Y

ejbserver.client.log.lockInterval

Select

variable

Y

ejbserver.client.log.lockRetryCount

Select

variable

Y

ejbserver.container.rebindpolicy

Select

variable

Y

2.13 Invoking the EJB remote interface in EJB Container Functionality Guide

ejbserver.jndi.cache

Select

variable

Y

ejbserver.jndi.cache.interval

Select

variable

Y

ejbserver.jndi.cache.interval.clear.option

Select

variable

Y

ejbserver.jndi.namingservice.group.list

Select

variable

Y

ejbserver.jndi.namingservice.group.specify-group-name.providerurls

Select

variable

Y

ejbserver.jndi.request.timeout

Select

variable

Y

ejbserver.logger.channels.define.channel-name#.filenum

Select

variable

Y

ejbserver.logger.channels.define.channel-name#.filesize

Select

variable

Y

ejbserver.logger.enabled.*

Select

variable

Y

ejbserver.rmi.request.timeout

Select

variable

Y

ejbserver.security.service.url

Select

variable

Y

ejbserver.serverName

Variable

Y

ejbserver.server.prf.PRFID

Select

variable

Y

java.naming.factory.initial

Variable

Y

java.naming.provider.url

Variable

Y

vbroker.agent.enableLocator

Select

variable

Y

vbroker.orb.htc.comt.entryCount

Select

variable

Y

vbroker.orb.htc.comt.fileCount

Select

variable

Y

vbroker.orb.htc.tracePath

Select

variable

Y

Unique keys

ejbserver.jndi.log.message.verbosemode

Select

variable

Y

ejbserver.server.prf.processName

Select

variable

Y

java.endorsed.dirs

Variable

N

java.naming.factory.object

Fixed

Y

java.naming.factory.state

Fixed

Y

javax.rmi.CORBA.UtilClass

Fixed

Y

javax.rmi.CORBA.StubClass

Fixed

N

javax.rmi.CORBA.PortableRemoteObjectClass

Fixed

Y

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

Fixed

Y

java.security.policy

Fixed

Y

org.omg.CORBA.ORBClass

Fixed

N

org.omg.CORBA.ORBSingletonClass

Fixed

N

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 the 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 12.2.2 usrconf.properties (User property file for Java applications). You can also see 2.2.3 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:

  • ejbserver.jndi.log.message.verbosemode

    Type: Select variable

    Value: on or off

    Default value: off

    Contents:

    Specify message log output in the standard output.

  • ejbserver.server.prf.processName

    Type: Select variable

    Value: Optional client identifier

    Normal value: EJBClient

    Contents:

    Specify the name that you want to display as the process name in the edit result of the performance analysis trace file. The normal value is used when null is specified or when this key is not specified.

  • java.endorsed.dirs

    Type: Variable

    Value: Directory path

    Normal value: Cosminexus-installation-directory\TPB\lib\endorsed (in Windows) or /opt/Cosminexus/TPB/lib/endorsed (in UNIX)

    Contents:

    Specify the directory path containing the class to be replaced by using the Endorsed Standards Override Mechanism.

  • java.naming.factory.object

    Type: Fixed

    Value: com.hitachi.software.ejb.jndi.InsNamingFactory

    Contents:

    Specify the implementation class of ObjectFactory that acts as the SPI of JNDI.

    ObjectFactory converts the object during object search.

    This key is compatible with the value (com.hitachi.software.ejb.jndi.nameserver.spi.cos.wrappers.vbj.WrapperObjectFactory) used in the earlier versions.

  • java.naming.factory.state

    Type: Fixed

    Value: com.hitachi.software.ejb.jndi.InsNamingFactory

    Contents:

    Specify the implementation class of the StateFactory that acts as the SPI of JNDI.

    StateFactory converts the object during object registration.

    This key is compatible with the value (com.hitachi.software.ejb.jndi.nameserver.spi.cos.wrappers.vbj.WrapperStateFactory) used in the earlier versions.

  • javax.rmi.CORBA.UtilClass

    Type: Fixed

    Value: com.hitachi.software.ejb.rmi.Util

    Contents:

    Specify the implementation class name of javax.rmi.CORBA.Util.

    This key is compatible with the value (com.inprise.vbroker.rmi.CORBA.UtilImpl) used in the earlier versions.

  • javax.rmi.CORBA.StubClass

    Type: Fixed

    Value: com.inprise.vbroker.rmi.CORBA.StubImpl

    Contents:

    Specify the implementation class name of javax.rmi.CORBA.Stub.

  • javax.rmi.CORBA.PortableRemoteObjectClass

    Type: Fixed

    Value: com.hitachi.software.ejb.rmi.PortableRemoteObject

    Contents:

    Specify the implementation class name of javax.rmi.PortableRemoteObject.

    This key is compatible with the value (com.inprise.vbroker.rmi.CORBA.PortableRemoteObjectImpl) used in the earlier versions.

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

    Type: Fixed

    Value: 1

    Contents:

    Specify the initialization class of the client interceptor for the security functionality.

    Specify the initialization class only when the Java application uses the EJB security interface to log on to the J2EE server and invoke an EJB.

  • java.security.policy

    Type: Fixed

    Value: absolute-path-of-the-security-policy-file

    Contents:

    Copy the Cosminexus-installation-directory\CC\client\cli.policy (in Windows) or /opt/Cosminexus/CC/client/cli.policy (in UNIX) to any directory in the client and specify the file name as an absolute path. Do not change the contents of the file.

  • org.omg.CORBA.ORBClass

    Type: Fixed

    Value: com.inprise.vbroker.orb.ORB

    Contents:

    Specify the implementation class name of ORB.

  • org.omg.CORBA.ORBSingletonClass

    Type: Fixed

    Value: com.inprise.vbroker.orb.ORBSingleton

    Contents:

    Specify the implementation class name for the singleton of ORB.

(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 H 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 H 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
  • The underlined text indicates an AIX-specific description.

  • Italic text is used to indicate that the variable name differs based on the operating system. Substitute the variable and use as follows:

    In AIX: LIBPATH

    In Linux: LD_LIBRARY_PATH