uCosminexus Application Server, System Setup and Operation Guide

[Contents][Glossary][Index][Back][Next]

Appendix M.1 Configuration and operation procedure of the sample execution environment by server management commands

This section describes the operation procedure and configuration of the J2EE server to execute sample programs with server management commands. This procedure is required to execute all the sample programs described from Appendix I.2 onwards.

Organization of this subsection
(1) Setting the J2EE server
(2) Customizing the J2EE server
(3) Starting the J2EE server
(4) Setting the resource adapter
(5) Importing, setting and starting the application
(6) Stopping and deleting the application
(7) Stopping the J2EE server

(1) Setting the J2EE server

Enter the cjsetup command in the command prompt to set up the J2EE server. The following execution example shows the setup procedure. In the execution example, the J2EE server called "MyServer" is set up.

C:\> cd Program Files\Hitachi\Cosminexus\CC\server\bin
C:\Program Files\Hitachi\Cosminexus\CC\server\bin>cjsetup MyServer
KDJE40001-I The setup for the J2EE server has finished successfully. Server name = MyServer
C:\Program Files\Hitachi\Cosminexus\CC\server\bin>

(2) Customizing the J2EE server

Specify the settings to access the application. Use any of the following methods to access the application:

This section describes about the usage of the in-process HTTP server functionality of the user-friendly J2EE server.

Define the property key in the user definition file (usrconf.properties) to enable the in-process HTTP server functionality.

Storage location of the user definition file:
C:\Program Files\Hitachi\Cosminexus\CC\server\usrconf\ejb\MyServer\usrconf.properties

Property key to be defined:
webserver.connector.inprocess_http.enabled=true
Note
Use the default port 80 in the in-process HTTP server. Change the port number by defining the webserver.connector.inprocess_http.port property key in the user definition file (usrconf.properties).
In the following example, 8081 is defined in the port used in the in-process HTTP server.
webserver.connector.inprocess_http.port=8081

(3) Starting the J2EE server

Start the J2EE server, already set up with the cjstartsv command.

C:\> cd Program Files\Hitachi\Cosminexus\CC\server\bin
C:\Program Files\Hitachi\Cosminexus\CC\server\bin>cjstartsv MyServer
<The start log is displayed>
 :
KDJE30028-I The J2EE server has started. Server name = MyServer

(4) Setting the resource adapter

Set the resource adapter by the following procedure:

  1. Import the resource adapter with the cjimportres command.
  2. Deploy the resource adapter with the cjdeployrar command.
  3. Acquire the Connector property file by using the cjgetrarprop command, edit the file and apply the edited contents with the cjsetrarprop command.
  4. Test the resource adapter with the cjtestres command.
  5. Start the resource adapter with the cjstartrar command.

(5) Importing, setting and starting the application

Use the batch file (deployApp.bat) provided in the sample to execute the application. This batch file imports, sets up and starts the application on the J2EE server.

The process executed by this batch file is as follows:

  1. The cjimportapp command is executed and the application is imported to the J2EE server.
  2. The cjstartapp command is executed and the application is started.
  3. The cjlistapp command is executed and the status of applications on the J2EE server is displayed in a list. The operation status (operating) of the application can be confirmed in this list.

(6) Stopping and deleting the application

Use the batch file (unDeployApp.bat) provided in the sample to execute the application. This batch file stops, and deletes the application from the J2EE server.

The process executed by this batch file is as follows:

  1. The cjstopapp command is executed and the application is stopped.
  2. The cjdeleteapp command is executed and application is deleted from the J2EE server.
  3. The cjlistapp command is executed and the status of the application on the J2EE server is displayed in a list. Deletion of the application can be confirmed by referencing this list.

(7) Stopping the J2EE server

Stop the J2EE server with the cjstopsv command.