Oracle
  Home arrow Oracle arrow J2EE Applications: Maintenance and Mon...
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ORACLE

J2EE Applications: Maintenance and Monitoring
By: McGraw-Hill/Osborne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2007-03-22

    Table of Contents:
  • J2EE Applications: Maintenance and Monitoring
  • Maintaining and Monitoring Applications
  • TWO-MINUTE DRILL
  • SELF TEST
  • SELF TEST ANSWERS

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Route your faxes to your email inbox. Private, secure fax numbers available from CallWave. Choose your fax number.

    J2EE Applications: Maintenance and Monitoring
    (Page 1 of 5 )

    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).

    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'' 
          path=''../applications/testapp.ear''
    />

    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''
          root=''/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.

    More Oracle Articles
    More By McGraw-Hill/Osborne


       · This article is an excerpt from the book "Oracle 10g Application Server Exam Guide,"...
     

    Buy this book now. This article is excerpted from chapter eight of the Oracle 10g Application Server Exam Guide, written by Sam Alapati (McGraw-Hill; ISBN: 0072262710). Check it out today at your favorite bookstore. Buy this book now.

       

    ORACLE ARTICLES

    - Tuning PL/SQL Code
    - Debugging PL/SQL Code
    - Testing PL/SQL Code
    - Working With PL/SQL Code
    - Conditional Compilation for Oracle Database ...
    - Compile-Time Warnings for Oracle DB 10g
    - Compiling PL/SQL Code for an Oracle Database
    - Troubleshooting PL/SQL Code
    - Managing PL/SQL Code
    - Data Manipulation and More for HTML DB Appli...
    - Oracle Database Fundamentals
    - Adding Processes to HTML DB Applications
    - Adding Computations, Processes, and Validati...
    - Sub-templates and More with Oracle HTML DB
    - Focusing on Templates in Oracle HTML DB




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway