Friday, August 29, 2008

What happens during Deployment

When you deploy an application packaged within an EAR, the following occurs:
  1. If the application is being redeployed, the existing installation is first undeployed from OC4J.
  2. OC4J copies the EAR file to the master deployment directory, which defaults to the ORACLE_HOME/j2ee/home/applications/ directory.
  3. OC4J opens and parses the application.xml file packaged within the EAR file. This file is a standard J2EE descriptor that lists all of the modules contained within the EAR file. OC4J notes these modules and initializes the EAR environment.
  4. OC4J reads the module deployment descriptors for each module type - Web module (WAR), EJB module, connector module, or client module - into memory. The JAR and WAR file environments are also initialized.
  5. OC4J reacts to the configuration details contained in both the J2EE deployment descriptors and any OC4J-specific deployment descriptors. OC4J notes any J2EE component configurations that require action by OC4J, such as wrapping EJBs with their interfaces.
  6. OC4J writes out new OC4J-specific configuration files to the ORACLE_HOME/j2ee/home/application-deployments/app_name directory, according to the contents of the deployment plan. Note that if one or more OC4J-specific deployment descriptors were supplied, you may notice that OC4J added additional elements to the generated files.
  7. Any generated classes, such as EJB interface wrapper classes, are compiled and put into new subdirectories of this directory. For example, EJB wrapper classes are generated within an archive named deployment-cache.jar within the ORACLE_HOME/j2ee/home/application-deployments/app_name/jar_name.jar/ directory, where jar_name.jar corresponds to the name of a deployed EJB JAR.
  8. Finally, OC4J updates the OC4J server.xml configuration file with the notation that this application has been deployed.
Courtesy:Oracle Containers for J2EE Deployment Guide

No comments: