Hitachi

uCosminexus Application Server Command Reference Guide


cjgencmpsql (generate SQL statements for CMP2.x Entity Beans)

Organization of this page

Format

cjgencmpsql [server-name] [-nameserver provider-URL] 
      -name application-name
      [-resname EJB-JAR-display-name/Entity-Bean-display-name]

Function

This command generates SQL statements for CMP2.x Entity Beans.

If you execute this command, the following SQL statements are generated:

The cjgencmpsql command must be executed for CMP2.x Entity Beans at the following timing:

If you change the CMR settings after the SQL statements are generated, you must execute the cjgencmpsql command and generate SQL statements for Beans related to the modified CMR settings before deploying the Beans.

This command can be executed only while the application is stopped.

When the application is in the exploded archive format, operations can be performed for a J2EE server that runs on the host same as the command execution host.

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 application name.

-resname EJB-JAR-display-name/Entity-Bean-display-name

Specifies the display name of the Entity Bean that becomes the target for SQL generation.

If this argument is omitted, all CMP2.x Entity Beans contained in the application become targets for SQL generation. This command attempts to generate SQL statements for all CMP2.x Entity Beans even if there is a CMP2.x Entity Bean for which SQL generation fails. If SQL generation fails for even one Entity Bean, the termination code becomes 1.

Input examples

cjgencmpsql MyServer -name App1 -resname EjbJar1/Ejb1

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 error occurred.

9:

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

Notes