This subsection describes the notes on replacing J2EE applications by redeploying.
- When a J2EE application is replaced, an error occurs if a J2EE application with the same name does not exist on the J2EE server. The J2EE application cannot be replaced in such a case.
- When you replace a J2EE application by redeploying, the runtime information of the J2EE application before replacement is inherited by the replaced J2EE application (new J2EE application). Therefore, if the replaced J2EE application contains the runtime information, the application cannot be replaced. The processing terminates with an error if you attempt such a replacement.
- By default, all the attributes of a J2EE application before replacement are inherited by the replaced J2EE application. If you want only the runtime attributes # to be inherited as in the versions earlier than 06-70, you must specify an option and execute the cjreplaceapp command. For details on the command, see cjreplaceapp (Replacing applications) in the uCosminexus Application Server Command Reference Guide.
- If there are differences in the following contents of the J2EE applications before and after replacement, the replacement processing terminates with an error:
- The number of EJB-JAR files, resource adaptors, and WARs is different in the J2EE application.
- The EJB-JAR file name, RAR file name, and WAR file name in the J2EE application differ before and after replacement.
- The method definitions of the home interfaces (local or remote), component interfaces (local or remote), and business interfaces (local or remote) in the EJB-JAR file are different.
- The DD definitions (application.xml, ejb-jar.xml, ra.xml, web.xml) differ when the settings are specified to inherit only the runtime attributes#.
- The set annotation values are changed.
Also, when the -replaceDD option is specified to replace the DD files (application.xml, ejb-jar.xml, ra.xml, and web.xml) as well, an error occurs if the following conditions are also fulfilled:
- The DD file (application.xml, ejb-jar.xml, ra.xml, and web.xml) tags are different.
- The DD file (application.xml, ejb-jar.xml, and web.xml) does not exist or a non-existent DD file comes into existence.
- When replacing a running J2EE application, the J2EE application-related objects that are stored in the pool or cache are destroyed.
- If application.xml version is 1.4 or earlier and for Java EE 5 or later, the conditions for determining the library JAR are different. For details on the rules for determining the modules such as the library JAR modules, see 11.4.3 Rules for determining the modules when application.xml exists.
- If the replaced J2EE application contains cosminexus.xml and uses CMP 2.0, you must execute the cjreplaceapp command when the J2EE application is in a stopped state. Also, after executing this command, you must execute the cjgencmpsql command before deploying the application.
- #
- You can specify the DD definitions (application.xml, ejb-jar.xml, ra.xml, and web.xml) and the property file-specific definitions in the property file. The property file-specific definitions are called runtime attributes.