Hitachi

uCosminexus Application Server Command Reference Guide


cjreplaceapp (replace application)

Organization of this page

Format

cjreplaceapp [server-name] [-nameserver provider-URL] 
       -name application-name -f file-path
       [-t timeout-time] [-replaceDD]

Function

This command replaces a J2EE application.

If the replaced J2EE application contains cosminexus.xml, the Application Server-specific definition information before replacing is destroyed, the default values are restored, and then the information is overwritten with the cosminexus.xml definition information. If the replaced J2EE application does not contain cosminexus.xml, the Application Server-specific definition information is inherited from the J2EE application before replacing.

Important note

When using a WAR application, cosminexus.xml is not read again and hence the definition information is not updated by inheriting the settings when importing.

This command can be executed whether the application is running or stopped. If the application is running, the system waits for the method in the application to terminate, stops the application, executes replacement processing, and then starts the application. However, if stop processing has not terminated even after the amount of time specified by the -t option has elapsed, the application is stopped forcibly.

Arguments

server-name

Specifies the name of a connected J2EE server. If the server name is omitted, the host name is assumed.

-nameserver provider-URL

Specifies the access protocol for the CORBA Naming Service, the name of the host running the CORBA Naming Service, and the port number being used by the host. These items are specified in the following format:

protocol-name: : host-name: port-number

For details on the specification items, see 2.1.2 Provider URL.

-name application-name

Specifies the name of the application to be replaced.

-f file-path

Specifies the path of the application file that is to be read.

Specify a standard application file (extension .ear), or WAR file (extension .war).

-t timeout-time

Specifies the maximum amount of time (in seconds) from when the command is executed to wait for a response to be returned, as an integer in the range 0 to 2147483647. When 0 is specified for a running application, no response is returned to the client until stop processing is completed.

If this argument is not specified, 60 seconds is assumed.

-replaceDD

Specifies that the definitions of the DD files (application.xml, ejb-jar.xml, ra.xml, and web.xml) of the pre-replacement application are not to be passed on to the post-replacement application.

Input examples

cjreplaceapp MyServer -name App1 -f App1.ear

Return values

0:

The command terminated normally.

1:

The command terminated abnormally.

2:

The command could not be executed because of an exclusion error.

3:

A timeout occurred.

9:

The command could not be executed because there are no administrator privileges (in Windows).

Notes