C.2 How to start a system
This section explains how to invoke each process in the component software, resources and J2EE applications.
- Organization of this subsection
(1) Specifying environment variables when a system is started
The following describes the environment variables to be set on the application server and integrated naming scheduler 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 H. 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.
cprfstart
(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.
osagent
(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.
ctmdmstart
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 C.2 (7) 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.
For manually invoking the CORBA Naming Service using the nameserv command:
-
Cancel the settings of the environment variable CLASSPATH using the set command.
set CLASSPATH=
-
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 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 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.
cjstartsv server-name
(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.
cjstartsv server-name
(c) 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 C.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.
cjstartsv server-name
(8) 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. Settings for J2EE Resources other than Resource Adapters in the uCosminexus Application Server Application Setup Guide.
- Important 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.
-
(9) 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).
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 Setting and starting the business application (when using CUI) in the uCosminexus Application Server System Setup and Operation Guide.
-
8.1 Importing the J2EE applications in the uCosminexus Application Server Application Setup Guide.
(10) 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.