7.2.4 Creating a new J2EE application
Create a J2EE application on the basis of the imported EJB-JAR and WAR files. Moreover, add RAR files that you want to use with EJB-JAR and WAR files.
- Organization of this subsection
(1) Adding the EJB-JAR files
Execute the following command to add an EJB-JAR file. If the J2EE application does not exist, a new J2EE application will be created.
- Execution format
cjaddapp [server-name] [-nameserver provider-URL] -type ejb -name J2EE-application-name -resname EJB-JAR-display-name
- Example of execution
cjaddapp MyServer -type ejb -name adder -resname adder
For details on the cjaddapp command, see cjaddapp (add resource) in the uCosminexus Application Server Command Reference Guide.
(2) Adding the WAR files
Execute the following command to add a WAR file. If the J2EE application does not exist, a new J2EE application will be created.
- Execution format
cjaddapp [server-name] [-nameserver provider-URL] -type war -name J2EE-application-name -resname WAR-display-name
- Example of execution
cjaddapp MyServer -type war -name adder -resname adder_war
For details on the cjaddapp command, see cjaddapp (add resource) in the uCosminexus Application Server Command Reference Guide.
(3) Adding RAR files
You execute the following command to add RAR files. If a J2EE application does not exist, a new J2EE application will be created:
- Execution format
cjaddapp [server-name] [-nameserver provider-URL] -type rar -name J2EE-application-name -resname RAR-display-name
- Example of execution
cjaddapp MyServer -type rar -name adder -resname account-rar
For details on the cjaddapp command, see cjaddapp (add resource) in the uCosminexus Application Server Command Reference Guide.
(4) Notes
-
When creating the J2EE application, the name corresponding to the J2EE-APP-name of JNDI name space (HITACHI_EJB/SERVERS/server-name/EJB/J2EE-APP-name/Enterprise-Bean-name) of the EJB home object is automatically allocated. For details on the JNDI name space, see 2.3 Binding and lookup of objects to the JNDI name space in the uCosminexus Application Server Common Container Functionality Guide.
-
For the applications in the exploded archive format, you cannot add EJB-JAR files, WAR files, and RAR files.
-
You cannot add EJB-JAR files without the extension .jar, WAR files without the extension .war, and RAR files without the extension .rar to applications where application.xml is omitted.
-
You cannot add a filter to WAR files where web.xml is omitted.
-
In the J2EE application name, specify only single-byte alphanumeric characters (0 to 9, A to Z, a to z) or the following special characters:
Plus sign (+), hyphen (-), period (.), caret symbol (^), and underscore (_)
-
Once you have created the J2EE application, you cannot change the name of the J2EE application.