Home arrow Oracle arrow J2EE Applications: Maintenance and Monitoring

J2EE Applications: Maintenance and Monitoring

In this final article of a six-part series, you will learn how to deploy, maintain, and monitor J2EE applications. You'll also review the content of all of the parts; a self-test is included at the end. It is excerpted from chapter eight of the Oracle 10g Application Server Exam Guide, written by Sam Alapati (McGraw-Hill; ISBN: 0072262710).

  1. J2EE Applications: Maintenance and Monitoring
  2. Maintaining and Monitoring Applications
By: McGraw-Hill/Osborne
Rating: starstarstarstarstar / 2
March 22, 2007

print this article



Deploying J2EE (EJB) Applications

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.

on the job:  The ejb-jar.xml file specifies the run-time behavior of EJBs.

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:

  1. Go to the OC4J home page and click the Applications tab.
  2. In the Deployed Applications section, click the Deploy EAR file.
  3. The Deploy Application Wizard—Select Application page appears next. The Deploy Application Wizard will deploy the selected EAR file and apply any configuration changes you may make. Select the J2EE application you wish to deploy by providing the name and the location of the application’s EAR file. You must also select the parent application here. Click Continue.
  4. The URL Mapping for Web Modules page is next. You map a Web module to a URL pattern on your Web site and click Next.
  5. On the Resource References Mapping page, you do the following: 

    • Select the JNDI location.
    • Select the data source.
    • Select the JNDI location.
    • For each CMP entity bean, select a data source location and the tables.
    • Click Next.
  6. On the User Manager page, select the User Manager you want to use for security. The JAZN XML User Manager provides complete security; to do this, you must set up a default realm and the jazn-data.xml file. The XML User Manager requires you to additionally configure the principals.xml file. Click Next.
  7. In the Security Role Mappings page, assign security roles to the users and groups that are part of the OC4J container.
  8. In the Publish Web Services page, click the Publish button if you want to publish and Web services has defined your application. Click Next.
  9. In the Summary page, review your selections and click Deploy.

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:

  1. The WAR or EAR file is copied to the server.
  2. The WAR or EAR Zip file is then expanded into runtime directories.
  3. If necessary, the context root in the httpd.conf file and the mount points in the oc4j.conf file and server.xml are modified. A new mount point is added to the oc4j. conf file to match the root context.
  4. All files are copied to the DCM repository.

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:


In addition, a new Oc4jMount command line is added to the oc4j.conf file to match the root context /testapp.

>>> More Oracle Articles          >>> More By McGraw-Hill/Osborne

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Oracle Java Security Woes Continue
- Oracle's New IaaS Cloud Option: There's a Ca...
- Oracle Acquires Eloqua to Boost Cloud Presen...
- Choosing Innovation: Oracle Survey Insights
- Oracle Fixes Privilege Escalation Bug
- Oracle`s Communications Service Availability...
- Oracle Releases Exalytics, Taleo Plans
- Oracle Releases Communications Network Integ...
- Oracle Releases Communications Data Model 11...
- Oracle Releases PeopleSoft PeopleTools 8.52
- Oracle Integrates Cloudera Apache Distro, My...
- Oracle Releases MySQL 5.5.18
- Oracle Announces NoSQL Database Availability
- Sorting Database Columns With the SELECT Sta...
- Retrieving Table Data with the LIKE Operator

Developer Shed Affiliates


Dev Shed Tutorial Topics: