Appendix D.2 How to start a system
(1) Specifying environment variables when a system is started
This subsection explains the environment variables to be specified in an Application Server, integrated naming scheduler server, and SFO server.
Specify the settings of the following environment variables using the set command:
set PATH=Cosminexus-installation-directory\jdk\bin;%PATH%
set PATH=Cosminexus-installation-directory\TPB\bin;%PATH%
set VBROKER_ADM=Cosminexus-installation-directory\TPB\adm
set TPDIR=Cosminexus-installation-directory\TPB
set CTMDIR=Cosminexus-installation-directory\CTM#
set CTMSPOOL=Cosminexus-installation-directory\CTM\spool# |
- #:
- You must set up these environment variables in Application Server and the integrated naming scheduler server, when using CTM.
- Specify JST-9 in the environment variable TZ, and register in the system environment variable.
- When you manually start the CORBA Naming Service, specify Cosminexus-installation-directory\jdk\bin at the beginning of the environment variable PATH.
- When using HiRDB or Oracle, specify the path of respective libraries in the environment variable PATH. If the path is already specified in the system environment variable, you are not required to execute the set command.
- During installation, system-drive:\Common Files\Hitachi is added to the environment variable PATH, and is registered automatically in the system environment variable.
- During installation, Cosminexus-installation-directory\PRF\spool is specified in the environment variable PRFSPOOL, and is registered automatically in the system environment variable.
For the contents of environment variables, see Appendix I System Environment Variables.
(2) Starting a PRF daemon
To start a PRF daemon:
- Move the current directory using the cd command.
cd "Cosminexus-installation-directory\PRF\bin" |
- Start the PRF daemon using the cprfstart command.
(3) Starting the Smart Agent
To start a Smart Agent:
- Move the current directory using the cd command.
cd "Cosminexus-installation-directory\TPB\bin" |
- Start the Smart Agent using the osagent command.
You must have the Administrator permission to execute the command.
(4) Starting the CTM domain manager
To start the CTM domain manager:
- Move the current directory using the cd command.
cd "Cosminexus-installation-directory\CTM\bin" |
- Start the CTM domain manager using the ctmdmstart command.
You must have the Administrator permission to execute the command.
When you start the CTM domain manager, do not specify the library path of the performance tracer (Cosminexus-installation-directory\PRF\lib) simultaneously. If you specify the library path of the performance tracer simultaneously, an error will occur in the CTM domain manager when the library of the performance tracer is loaded, and you will not be able to start the CTM domain manager.
(5) Invoking the CORBA Naming Service
This subsection explains how to invoke the CORBA Naming Service.
We recommend that you invoke the CORBA Naming Service for a J2EE server as an in-process, while you start the J2EE server. For invoking the CORBA Naming Service as an out-process, use the nameserv command.
How to invoke the CORBA Naming Service as an out-process using the nameserv command is explained here. For details on invoking the CORBA Naming Service as an in-process when you start a J2EE server, see D.2 (8) Starting a J2EE server.
Consider the following point when invoking the CORBA Naming Service:
- When using CTM, invoke the CORBA Naming Service for J2EE server and for CTM. Manually invoke the global CORBA Naming Service for CTM using the nameserv command, and automatically invoke the CORBA Naming Service for J2EE server as an in-process during the startup of the J2EE server.
- When you start an SFO server within an Application Server during the inheritance of session information between two J2EE servers, you are not required to invoke the CORBA Naming Service, since the CORBA Naming Service for an SFO server must be already invoked as an in-process.
For manually invoking the CORBA Naming Service using the nameserv command:
- Cancel the settings of the environment variable CLASSPATH using the set command.
- Move the current directory using the cd command.
cd "Cosminexus-installation-directory\TPB\bin" |
- Manually start the local CORBA Naming Service using the nameserv command.
You need to have the Administrator permission to execute the command.
nameserv -J-Dvbroker.agent.enableLocator=false
-J-Djava.security.policy=="Cosminexus-installation-directory\
CC\server\sysconf\cli.policy"
-J-Dvbroker.se.iiop_tp.scm.iiop_tp.listener.port=port-number |
- Caution
- When you start the CORBA Naming Service manually, specify Cosminexus-installation-directory\jdk\bin at the beginning of the environment variable PATH.
- If the value of the option specified using the nameserv command contains a directory that includes a space, enclose the entire value within double quotation marks (").
- Change the value specified using the nameserv command in conformity with the environment.
- Invoke the CORBA Naming Service with the port number specified using the following option:
-J-Dvbroker.se.iiop_tp.scm.iiop_tp.listener.port=port-number
(6) Starting a CTM daemon
To start a CTM daemon:
- Move the current directory using the cd command.
Cd "Cosminexus-installation-directory\CTM\bin" |
- Start the CTM daemon using the ctmstart command.
You must have the Administrator permission to execute the command.
ctmstart -CTMINSRef host-name:port-number |
Specify the host name and port number in which the global CORBA Naming Service is invoked.
When you start a CTM daemon, do not specify the library path of the performance tracer (Cosminexus-installation-directory\PRF\lib) simultaneously. If you specify the library path of the performance tracer simultaneously, an error will occur in the CTM daemon when the library of the performance tracer is loaded, and you will not be able to start the CTM daemon.
- Reference note
- You can specify the following files when executing the ctmstart command used to start a CTM daemon:
- CTM user environment variable definition file
This file is specified with the -CTMEnviron option. When you want to specify the environment variables that the processes managed in CTM daemon use, describe the environment variables in this file.
- CTM command option file
This file is specified with -CTMRegOption. When you want to specify the command options during the automatic start of a CTM regulator, describe the command options in this file.
- If necessary, create these files.
(7) Starting an SFO server
To start an SFO server:
- Move the current directory using the cd command.
cd "Cosminexus-installation-directory\CC\server\bin" |
- Specify the -nosecurity option in the cjstartsv command, and start the SFO server.
You need to have Administrator permission to execute the command.
cjstartsv server-name -nosecurity |
- Start SFO server applications.
If SFO server applications are stopped when an SFO server is started, use server management commands for starting the SFO server applications. Note that you need to have Administrator permission to execute server management commands.
The name of an SFO server application is CCC_SFO_Server_Application.
- Note
- You can only execute the SFO server applications in an SFO server. Do not execute other applications in an SFO server.
(8) Starting a J2EE server
This subsection explains the method for starting a J2EE server.
We recommend that you invoke the following processes as the in-process, when starting a J2EE server:
- CORBA Naming Service for a J2EE server
- Transaction service (when you use a transaction service)
When using CTM, invoke the CORBA Naming Service for J2EE server as an in-process.
The procedure for starting a J2EE server in the following cases is explained in (a) - (d):
- When you invoke the CORBA Naming Service as an in-process in a standard system configuration
- When you invoke the CORBA Naming Service and transaction service as the in-process in a configuration using CTM
- When you start an in-process HTTP server and invoke the CORBA Naming Service as an in-process in a standard system configuration.
- When you invoke the CORBA Naming Service as an out-process in a standard system configuration
You also consider the following point when starting a J2EE server:
- When you share a single naming service among multiple J2EE servers, start J2EE servers one-by-one. If you try to start more than one J2EE servers at the same time, the attempt to start J2EE servers will fail.
(a) When invoking the CORBA Naming Service as an in-process in a standard system configuration
For starting a J2EE server, when you invoke the CORBA Naming Service as an in-process in a standard configuration:
- Move the current directory using the cd command.
cd "Cosminexus-installation-directory\CC\server\bin" |
- Start the J2EE server using the cjstartsv command.
You need to have the Administrator permission to execute the command.
(b) When invoking the CORBA Naming Service and transaction service as the in-process in a configuration using CTM
The procedure for starting a J2EE server, when you invoke the CORBA Naming Service for J2EE server, and the transaction service as the in-process in a configuration using CTM is explained here.
The prerequisite for invoking the CORBA Naming Service for J2EE server, and the transaction service as the in-process is as follows:
- The TCP port number of the CORBA Naming Service for J2EE server must be set up in the ejbserver.naming.port key of the usrconf.properties file.
ejbserver.naming.port = TCP-port-number
To start a J2EE server:
- Move the current directory using the cd command.
cd "Cosminexus-installation-directory\CC\server\bin" |
- Start the J2EE server using the cjstartsv command.
You must have the Administrator permission to execute the command.
(c) When starting an in-process HTTP server and invoking the CORBA Naming Service as an in-process in a standard system configuration
The procedure for starting a J2EE server, when you start an in-process HTTP server, and then invoking the CORBA Naming Service as an in-process in a standard system configuration is as follows:
The prerequisites for starting an in-process HTTP server, and invoking the CORBA Naming Service as an in-process are as follows:
- When using an in-process HTTP sever
True must be specified in the webserver.connector.inprocess_http.enabled key of the usrconf.properties file.
- When using the CORBA Naming Service for J2EE server as an in-process
The TCP port number of the CORBA Naming Service for J2EE server must be set up in the ejbserver.naming.port key of the usrconf.properties file.
ejbserver.naming.port = TCP-port-number
- Move the current directory using the cd command.
cd "Cosminexus-installation-directory\CC\server\bin" |
- Start the J2EE server using the cjstartsv command.
You must have the Administrator permission to execute the command.
(d) When invoking the CORBA Naming Service as an out-process in a standard system configuration
For starting a J2EE server, when you invoke the CORBA Naming Service used for a J2EE server as an out-process in a standard system configuration.
The prerequisites for starting the CORBA Naming Service used for a J2EE server as an out-process are as follows:
- Before you start a J2EE server, you need to invoke the CORBA Naming Service for the J2EE server. For details on invoking the CORBA Naming Service manually, see D.2 (5) Invoking the CORBA Naming Service.
- You need to set manual in the ejbserver.naming.startupMode key of the usrconf.properties file.
- Take precaution that the TCP port number to be set in the ejbserver.naming.port key of the usrconf.properties file does not have the same value as another CORBA Naming Service running on the same host.
To start a J2EE server:
- Move the current directory using the cd command.
cd "Cosminexus-installation-directory\CC\server\bin" |
- Start the J2EE server using the cjstartsv command.
You need to have the Administrator permission to execute the command.
(9) Starting a resource
This subsection explains the method for starting a resource.
Start a resource using the server management command (cjstartrar or cjstartjb command).
Note that the resource to be started needs to be deployed in a J2EE server in advance, as a J2EE resource. You use server management commands also for deploying the resource in the J2EE server.
This operation is not required when you use a resource adapter included in the J2EE application.
For details, see 6. Setting up J2EE Resources Other Than Resource Adapters in the Cosminexus Application Server Application Setup Guide.
- Note
- When you want to start Cosminexus RM, start DB Connector for Cosminexus RM in advance. If you try to start Cosminexus RM without starting DB Connector for Cosminexus RM, an error will occur.
- You can start the root resource adapter when all the member resource adapters belonging to the root resource adapter are running.
(10) Starting a J2EE application
This subsection explains how to start a J2EE application.
Start a J2EE application using server management commands. Note that you need to have the Administrator permission to execute server management commands.
To start a J2EE application, use the server management command (cjstartapp).
You start a J2EE application after selecting an operation mode as per the usage of the J2EE application. A J2EE application that runs during the actual operation is executed in the normal mode. A J2EE application is executed in the test mode to confirm the working before the actual operation.
How to start a J2EE application differs depending on the operation mode. How to start a J2EE application in the respective cases:
- In the case of normal mode
To start a J2EE application in the normal mode, use the server management command (cjstartapp).
- In the case of test mode
To start a J2EE application in the test mode, specify the -test option in the server management command cjstartapp, and then run the command.
The J2EE application that is to be started needs to be imported in advance in the J2EE server. A J2EE application is an EAR in which the Enterprise Bean (EJB-JAR), and the servlet and JSP (WAR) are compiled together as one. You use server management commands to start and terminate in each J2EE application.
You also use server management commands to import a J2EE application to a J2EE server. You can also change a WAR and EJB-JAR created in the development environment to a J2EE application using server management commands.
For details, see the following locations:
- 4.1.29 Start by setting business applications (when using CUI) in the uCosminexus Application Server System Setup and Operation Guide.
- 8.1 Importing J2EE applications in the uCosminexus Application Server Command Reference Guide.
(11) Starting a Web server
For details on starting a Web server, see the manual on the Web server you are using.
Note that the timing to start the Web server depends on the mode of the system operation, but you can start the Web server in this order for controlling the reception of requests in a J2EE application. After starting the Web server, start the reception of requests in the J2EE application from the Web client.