EJB modules depend on deployment descriptors to specify the runtime attributes of the enterprise beans. Deployment descriptors are saved in ejb-jar.xml files. EJBs are packaged and shipped along with their deployment descriptors (contained in the ejb-jar.xml file) in a standard format, in the form of a .jar (dot jar) file. When you deploy an EJB application, the deployment tool first reads the deployment descriptors specified in the ejb-jar.xml file. From this, the deployment tool gets information about the EJB, such as the type of beans packed in the .jar file, their transaction attributes, and their access permissions.
Using the Application Server Control to Deploy J2EE Applications It is very easy to deploy J2EE applications through the Application Server Control. Here are the steps:
Using dcmctl to Deploy EJBs You can use the dcmctl deployApplication command, explained previously to show how to deploy Web application modules (WAR files), to deploy J2EE applications as well. Here’s an example: $ dcmctl deployapplication -file /test/testEAR.ear -a testEAR -co OC4J_Test The dcmctl deployApplication command is similar to the command you use to deploy Web applications, with the difference that you don’t have to specify the -rc option in the case of J2EE application deployment. If you use the -co (component name) option to specify a particular OC4J instance, the operation applies to only that OC4J instance within an OracleAS instance. In our example, the EAR module will be deployed to the OC4J instance named OC4J_Test. If you don’t specify the -co target option, the operation applies by default to the OC4J instance named home. The following things happen when you execute the deployApplication command:
Changes in Configuration Files When you deploy applications, either by using the dcmctl utility or through the Application Server Control, several changes are made in the OC4J configuration. The following text gives a brief summary of the changes made in the main configuration files. The application name is added to the server.xml file: <application name=''testapp'' The context root for your new application (testapp) is added to the default-web-site.xml file, as shown here: <web-app application=XXXX;testapp'' name=''testapp'' The application.xml file, located in the $ORACLE_HOME/applications/testapp/META-INF/ testapp directory is modified by adding the application module definitions to it: <web><web-uri>webtestapp.war</web-uri></web> In addition, a new Oc4jMount command line is added to the oc4j.conf file to match the root context /testapp.
blog comments powered by Disqus |
|
|
|
|
|
|
|