Appendix D.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
(2) Starting a PRF daemon
(3) Starting the Smart Agent
(4) Starting the CTM domain manager
(5) Invoking the CORBA Naming Service
(6) Starting a CTM daemon
(7) Starting an SFO server
(8) Starting a J2EE server
(9) Starting a resource
(10) Starting a J2EE application
(11) Starting a Web server

(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.

For the contents of environment variables, see Appendix I System Environment Variables.

(2) Starting a PRF daemon

To start a PRF daemon:

  1. Move the current directory using the cd command.

    cd "Cosminexus-installation-directory\PRF\bin"

  2. Start the PRF daemon using the cprfstart command.

    Cprfstart

(3) Starting the Smart Agent

To start a Smart Agent:

  1. Move the current directory using the cd command.

    cd "Cosminexus-installation-directory\TPB\bin"

  2. 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:

  1. Move the current directory using the cd command.

    cd "Cosminexus-installation-directory\CTM\bin"

  2. 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 D.2 (8) Starting a J2EE server.

Consider the following point when invoking the CORBA Naming Service:

For manually invoking the CORBA Naming Service using the nameserv command:

  1. Cancel the settings of the environment variable CLASSPATH using the set command.

    set CLASSPATH=

  2. Move the current directory using the cd command.

    cd "Cosminexus-installation-directory\TPB\bin"

  3. 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:

  1. Move the current directory using the cd command.

    Cd "Cosminexus-installation-directory\CTM\bin"

  2. 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:

  1. Move the current directory using the cd command.

    cd "Cosminexus-installation-directory\CC\server\bin"

  2. 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

  3. 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:

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):

You also consider the following point when starting a J2EE server:

(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:

  1. Move the current directory using the cd command.

    cd "Cosminexus-installation-directory\CC\server\bin"

  2. 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:

To start a J2EE server:

  1. Move the current directory using the cd command.

    cd "Cosminexus-installation-directory\CC\server\bin"

  2. Start the J2EE server using the cjstartsv command.
    You must have the Administrator permission to execute the command.

    cjstartsv server-name

(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:

  1. Move the current directory using the cd command.

    cd "Cosminexus-installation-directory\CC\server\bin"

  2. Start the J2EE server using the cjstartsv command.
    You must have the Administrator permission to execute the command.

    cjstartsv server-name

(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:

To start a J2EE server:

  1. Move the current directory using the cd command.

    cd "Cosminexus-installation-directory\CC\server\bin"

  2. Start the J2EE server using the cjstartsv command.
    You need to have the Administrator permission to execute the command.

    cjstartsv server-name

(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:

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:

(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.