D.2 How to start a system
This section explains how to invoke each process of the configuration 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.
In the case of C shell, set the below-mentioned environment variables using the setenv command:
set path=( /opt/Cosminexus/jdk/bin /opt/Cosminexus/TPB/bin /bin $path) setenv SHLIB_PATH "${SHLIB_PATH}:/opt/Cosminexus/TPB/lib:/opt/Cosminexus/PRF/lib:/opt/hitachi/common/lib" setenv VBROKER_ADM /opt/Cosminexus/TPB/adm setenv TPDIR /opt/Cosminexus/TPB setenv PRFSPOOL /opt/Cosminexus/PRF/spool setenv CTMDIR /opt/Cosminexus/CTM# setenv CTMSPOOL /opt/Cosminexus/CTM/spool# setenv TZ JST-9
- #:
-
You must set up these environment variables in Application Server and the integrated naming scheduler server, when using CTM.
-
The underscored strings are OS-specific variable names. In AIX, they are replaced by LIBPATH. In Linux, they are replaced by LD_LIBRARY_PATH.
-
When you start the CORBA Naming Service manually, specify /opt/Cosminexus/jdk/bin at the beginning of the environment variable PATH.
-
When using HiRDB or Oracle, set the path of the respective libraries in the environment variable LIBPATH (in AIX) or LD_LIBRARY_PATH (in Linux). If the path is already set in the environment variable, you need not execute the setenv command.
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 /opt/Cosminexus/PRF/bin
-
Start the PRF daemon using the cprfstart command.
# cprfstart
(3) Starting the Smart Agent
To start the Smart Agent:
-
Move the current directory using the cd command.
# cd /opt/Cosminexus/TPB/bin
-
Start the Smart Agent using the osagent command
# osagent &
(4) Starting the CTM domain manager
To start the CTM domain manager:
-
Move the current directory using the cd command.
# cd /opt/Cosminexus/CTM/bin
-
Start the CTM domain manager using the ctmdmstart command.
# ctmdmstart
(5) Invoking the CORBA Naming Service
This point 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, when you start the J2EE server. To invoke the CORBA Naming Service as an out-process, use the nameserv command.
The method for invoking 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 (7) Starting a J2EE server.
Consider the following 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.
To manually invoke the CORBA Naming Service using the nameserv command:
-
Cancel the settings of the environment variable CLASSPATH using the unsetenv command. (for C shell)
# unsetenv CLASSPATH
-
Move the current directory using the cd command.
# cd /opt/Cosminexus/TPB/bin
-
Manually start the local CORBA Naming Service using the nameserv command.
You need to have the root permission to execute the command.
# nameserv -J-Dvbroker.agent.enableLocator=false -J-Djava.security.policy==/opt/Cosminexus/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 /opt/Cosminexus/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 blank, 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 /opt/Cosminexus/CTM/bin
-
Start the CTM daemon using the ctmstart command.
# ctmstart -CTMINSRef host-name:port-number
Specify the host name and port number in which the global CORBA Naming Service is invoked.
- 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 point explains how to start a J2EE server.
We recommend that you invoke the following process as 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
Additionally, consider the following 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.
-
You need to have the root permission (when the Component Container Administrator is not set) or permission of the Component Container Administrator (when the Component Container Administrator is set) to execute the cjstartsv command.
-
If a user who does not have the root permission is set as Component Container Administrator, you need to set a value of 1024 or more in the port number of the CORBA Naming Service for the J2EE server. If you do not specify a value of 1024 or more, it will result in an error and you will not be able to start the J2EE server.
-
If the error message KDJE47500-E is output when you start a J2EE server, the attempt to start the J2EE server will fail because the CORBA Naming Service you want to use is already running. Terminate the already running CORBA Naming Service, and then start the J2EE server.
(a) When invoking the CORBA Naming Service as an in-process in a standard system configuration
To start a J2EE server when you invoke the CORBA Naming Service as an in-process in the standard configuration:
-
Use the cd command to move the current directory.
# cd /opt/Cosminexus/CC/server/bin
-
Use the cjstartsv command to start the J2EE server.
You need to have the root permission (when the Component Container Administrator is not set) or permission of Component Container Administrator (when the Component Container Administrator is set) 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 as follows:
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 /opt/Cosminexus/CC/server/bin
-
Start the J2EE server using the cjstartsv command.
You must have the root permission (when the Component Container Administrator is not set up), or the permission of the Component Container Administrator (when the Component Container Administrator is set up), to execute the command.
# cjstartsv server-name
(c) When invoking the CORBA Naming Service as an out-process in a standard system configuration
This subsection explains the procedure for starting a J2EE server when the CORBA Naming Service for J2EE server is invoked as an out-process in the standard system configuration.
The prerequisites for starting the CORBA Naming Service for J2EE server as an out-process are as follows:
-
Before you start the J2EE server, you need to invoke the CORBA Naming Service for 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 value same as another CORBA Naming Service running on the same host.
To start a J2EE server:
-
Use the cd command to move the current directory.
# cd /opt/Cosminexus/CC/server/bin
-
Use the cjstartsv command to start the J2EE server.
You need to have the root permission (when the Component Container Administrator is not set) or permission of Component Container Administrator (when the Component Container Administrator is set) to execute the command.
# cjstartsv server-name
(8) Starting a resource
This point explains how to start a resource.
You use the server management command (cjstartrar command or cjstartjb command) for starting a resource.
Note that the resource that is to be started needs to be deployed on the J2EE server in advance, as a J2EE resource. You use server management commands also for deploying resources in the J2EE server.
When you use a resource adapter included in a J2EE application, this operation is not required.
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 point explains how to start a J2EE application.
You use server management commands to start a J2EE application. Note that you must have the root permission (when the Component Container Administrator is not set) or permission of Component Container Administrator (when the Component Container Administrator is set) to execute server management commands.
To start a J2EE application, use the cjstartapp server management command.
The J2EE application to be started needs to be imported in the J2EE server in advance, as a J2EE application. A J2EE application is an EAR that includes the Enterprise Bean (EJB-JAR), servlets, and JSPs (WAR) that are the configuration elements of the J2EE application created in an application development environment. You use server management commands for starting and terminating in the J2EE application unit.
You also use server management commands for importing a J2EE application in to a J2EE server. Additionally, you can also use server management commands for changing a WAR and EJB-JAR created in the development environment to a J2EE application.
For details, see the followings.
-
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 J2EE application 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 of starting a 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, the reception of requests in the J2EE applications from the Web client starts.