You are previewing Oracle Application Server 10g: J2EE Deployment and Administration.
O'Reilly logo
Oracle Application Server 10g: J2EE Deployment and Administration

Book Description

Oracle Application Server 10g: J2EE Deployment and Administration focuses on the latest version of Oracle's fully J2EE-certified application server (previously called Oracle9iAS). Oracle Corp. is aggressively attacking this market with a new lost-cost version of the server, as well as a program to move BEA customers onto Oracle free of charge. Adoption interest is growing rapidly amidst favorable reports regarding performance and reliability.

Deploying and configuring J2EE applications are some of the trickiest processes in J2EE development, and they unfortunately receive scant attention in general J2EE texts. This book is a focused, no-frills guide to getting J2EE applications up and running on 10g. It covers Oracle's J2EE container, OC4J (available free of charge for development purposes), in full detail. It moves on to explain how to best configure and use the various enterprise-level features that come with the commercial editions. This is the book for anyone wanting to stay ahead in the world of Oracles application servers.

Table of Contents

  1. About the Authors
  2. About the Technical Reviewers
  3. Acknowledgments
  4. 1. Overview of Features, Editions, and Releases
    1. Choosing an Edition
      1. Deciding Which Features You Need
    2. Choosing a Release Version
      1. OAS
      2. iAS
      3. 9iAS v1
      4. 9iAS v2
      5. 10g AS
    3. J2EE Features
      1. Servlets and JavaServer Pages
      2. Enterprise JavaBeans
      3. Java Message Service
      4. Java Database Connectivity and J2EE Connectors
      5. Transactions
      6. Security
      7. Other J2EE Services
    4. Non-J2EE Components
      1. Oracle HTTP Server
      2. Web Cache
      3. Application Server Control
      4. Single Sign-On
      5. Content Management SDK
      6. Integration
      7. Oracle Internet Directory
      8. JDeveloper
      9. TopLink
      10. Portal
      11. Discoverer
      12. Reports
      13. Forms
      14. Personalization
      15. Wireless
    5. Summary
  5. 2. Developing with Oracle 10g AS
    1. Choosing an Edition for Developers
      1. Consider Application Requirements
      2. Consider Developer Experience
      3. Setting Up the Development Environment
    2. Choosing an Edition for Testing
      1. Running Unit Tests
      2. Running Integration Tests
      3. Running Performance Tests
      4. Environmental Considerations
    3. Strategies for Development
    4. Strategies for Testing
    5. Strategies for Deployment
    6. Accessing J2EE Applications
    7. Summary
  6. 3. OC4J Installation and Runtime Behavior
    1. Installing the Standalone Server
      1. Downloading and Setting Up OC4J Standalone
      2. Testing Your Installation
      3. Exploring the Server Directory Structure
    2. Basic Operation
      1. Starting the Server
      2. Stopping the Server
      3. Restarting the Server
      4. Sample Scripts
      5. Running as a Windows Service
      6. Running as a UNIX Service
    3. Runtime Behavior
      1. Server Architecture
      2. Classloading
      3. Ports and Protocols
      4. Performance and Memory Usage
      5. Compilers
    4. Summary
  7. 4. General Server Configuration
    1. Working with Configuration Files
      1. Configuring Application-level Resources
      2. Editing Configuration Files
      3. Managing Multiple Configurations
    2. Finding the Right Configuration File
    3. Configuring Logging
      1. Configuring Log Filenames and Locations
      2. Redirecting Standard Output and Error Streams
      3. Using OC4J Debug Parameters
    4. Configuring File Locations
    5. Configuring Ports
      1. HTTP
      2. HTTPS
      3. Java Message Service
      4. Remote Method Invocation
      5. IIOP
    6. Configuring Compilers
      1. In-Process Compilation
      2. Compiling with Jikes
    7. Configuring Transactions
      1. Transaction Timeout
      2. Transaction Recovery
    8. Configuring Other J2EE Services
    9. Configuring HTTP Connection Throttling
    10. Configuring Deployment Behavior
      1. application-auto-deploy-directory
      2. application-directory
      3. deployment-directory
      4. connector-directory
      5. auto-start-applications
    11. Configuring Applications
    12. Summary
  8. 5. Configuring JNDI and JDBC Services
    1. Java Naming and Directory Interface
      1. Understanding JNDI Locations
      2. Getting a JNDI Context
    2. Accessing Databases from J2EE Applications
      1. Simple Database Access in Non-J2EE Environment
      2. Database Access in a J2EE Environment
    3. JDBC Drivers
      1. Choosing the Right Driver
    4. Choosing a Data Source Type
    5. Configuring Data Sources
      1. Customizing Data-Source Attributes
      2. Customizing Data Source Properties
      3. Deploying Data Sources
    6. Using Data Sources
      1. Determining the Correct JNDI Location
      2. Overriding the Default Username and Password
      3. Using Oracle JDBC extensions
    7. Configuring Two-Phase Commit
    8. Summary
  9. 6. Configuring Java Message Service
    1. JMS in Oracle 10g Application Server
      1. The Resource Provider Model
    2. Configuring and Using Oracle 10g AS JMS
      1. Standard Configuration
      2. Building and Configuring an Application
      3. Configuring File Persistence
      4. Configuring Hosts and Ports
      5. Configuring Logging
    3. Configuring Oracle JMS
      1. Setting Up the Queue
      2. Configuring Oracle 10g AS
      3. Configuring the Hello World Application
    4. Configuring Third-Party JMS
    5. Picking Your Provider
    6. Summary
  10. 7. Security
      1. Introduction to J2EE Security
      2. Introduction to the Java Authentication and Authorization Service
      3. Oracle Application Server Security Overview
      4. Creating and Configuring a Secure Application
      5. Administering the HelloServlet Application with JAZN Admintool
      6. Using the JAZNUserManager LDAP Provider
      7. Using DataSourceUserManager
      8. Customizing Security
      9. Choosing Your Security Method
    1. Summary
  11. 8. Using JavaMail and Java APIs for XML
    1. JavaMail
      1. Building an Application with JavaMail and JNDI
      2. Configuring a Mail Session
      3. Creating a Local Resource Reference
      4. The Mail Form
      5. Building the JavaMailServlet
      6. Choosing Between Global and Local Namespaces
    2. Java APIs for XML
      1. Determining your JAX version
      2. Overriding the JAX implementation
      3. Testing the JAX Override
    3. Summary
  12. 9. J2EE Application Deployment
    1. J2EE Architecture
    2. Configuration
      1. OC4J Server Configuration Files
      2. Application Configuration Files
    3. Organization and Packaging
      1. Java Archive File
      2. Web Archive (WAR) File
      3. Enterprise Archive (EAR) File
    4. Deployment
      1. Deployment Steps
      2. Explanation of Deployment
      3. Forcing a Automatic Redeployment
    5. Summary
  13. 10. Web Applications
    1. Building and Deploying Applications
      1. WAR Applications
      2. EAR Applications
      3. EAR Deployment Mechanics
    2. Configuring orion-web.xml
      1. First Look at orion-web.xml
      2. Overriding Context Parameters and Environment Variables
      3. Classloading
      4. File Types, Locations, and Type-Based Filters
      5. Clustering
      6. URL-Based Expiration
      7. Session Configuration, Session and Request Tracking
      8. Resolving Resource References and EJB References
      9. Security Configuration and Resolving Security Roles
      10. Host and Network-Based Access Control
      11. Summary of Overriding web.xml Settings
    3. Using the Application Server Control
    4. Summary
  14. 11. Enterprise JavaBeans
    1. Basic Deployment Process
    2. About orion-ejb-jar.xml
      1. Overall Structure
    3. Configuring EJB Deployments
      1. Session Bean Deployment Header
      2. Entity Bean Deployment Header
      3. Message-Driven Bean Deployment Header
      4. Resolving EJB References
      5. Resolving Resource References
      6. Resolving Resource env References
      7. Overriding Environment Entries
      8. Asynchronous Invocation with AC4J
      9. RMI/IIOP Security Interoperability
    4. Resolving Security Roles
    5. Summary
  15. 12. J2EE Connectors
    1. What Are J2EE Connectors?
    2. OC4J Support for Connectors
    3. Finding a Connector
      1. Writing a Connector
    4. Configuring a Connector
      1. Basic Packaging and Configuration
      2. OC4J Connector Descriptor
      3. Configuring the Name and JNDI Location
      4. Overriding Values from ra.xml
      5. Configuring Connection Pooling
      6. Configuring Security
      7. Configuring Transactions
      8. Configuring Logging
    5. Deploying a Connector
    6. Summary
  16. 13. Configuring Web Services
    1. Choosing a Web-Service Implementation Type
    2. Creating the Echo Web Service
      1. Building the Web-Service Interface
      2. Building the Stateless Implementation
      3. Building the Stateful Implementation
      4. Configuring and Deploying the Web Service
      5. Using Stateless Session Beans
    3. Testing the Web Service
      1. Testing the echo Operation
    4. Creating Web-Service Clients
      1. Building the Apache Axis Client
      2. Building the Proxy Client
      3. Building the .NET Client
    5. Summary
  17. 14. Application Clients
    1. Choosing a Client Type
    2. Connecting from a J2SE Client
      1. Implementing the Client
      2. Configuring JNDI
      3. Authenticating Through JNDI
      4. Authenticating Through JAAS
      5. Building the Client
      6. Running the Client
    3. Connecting from a J2EE Application Client
      1. Implementing the Client
      2. Configuring JNDI
      3. Implementing a JAAS CallbackHandler
      4. Server-Side Configuration
      5. Running the Client
    4. Summary
  18. 15. Architecture and Deployment Topologies
    1. Overview
      1. Connection Architecture
    2. Architecture
      1. Terminology
      2. Infrastructure
      3. Middle Tier
    3. Deployment Topologies
      1. Standalone J2EE with Web Cache
      2. Business Intelligence and Forms
      3. J2EE Clusters with Web Cache
    4. Summary
  19. 16. Installation and Administration
    1. Installation
      1. Preinstallation Requirements
      2. Installation Steps
    2. Routine Administration
      1. Administrative Duties
      2. Application Server Control Utility
      3. Command-Line Utilities
    3. Summary
  20. 17. Configuring J2EE Services
    1. J2EE Overview
      1. Deployment Tiers
      2. Mid-Tier Code Types
      3. Version Information
    2. OC4J Architecture
      1. Structure
      2. Processing
    3. Configuration Utilities and Options
    4. Monitoring and Tuning Utilities
      1. Application Server Control Log Utilities
      2. AggreSpy and dmstool
      3. iHAT (Hi-AV) Tool
    5. Summary
  21. 18. Deploying Applications
    1. Development Overview
    2. Creating a Dedicated OC4J Instance
      1. Benefits
      2. Steps
    3. Deploying and Undeploying Applications with the ASC
      1. Deployment Steps
      2. Redeployment Steps
      3. Undeployment Steps
    4. Deploying and Undeploying Applications Manually
      1. Deployment Steps
      2. Redeployment Steps
      3. Undeployment Steps
    5. Modifying Application Configurations with the ASC
      1. Default Application Settings
      2. Application-Specific Settings
    6. Summary
  22. 19. Configuring Web Caching
    1. Overview
      1. Architecture
      2. Benefits
      3. Drawbacks
    2. Configuring Web Cache
      1. Administrative Tools
      2. Configuration Steps
      3. Configuration Properties
    3. Logging and Monitoring
      1. Event and Access Logs
      2. Web Cache Statistics
      3. Origin Server Statistics
      4. Popular Requests
      5. Web Cache Detailed Statistics Monitor
    4. Cacheability Rules and Invalidation
      1. Default Cache Settings
      2. Expiration Policies
      3. Invalidation Methods
    5. Summary
  23. 20. Configuring Enterprise Security
    1. Threats and Impacted Parties
      1. Threats
      2. Everyone Is Impacted
    2. Web Security Fundamentals
      1. Harden Every Layer
      2. Network Design and Firewalls
      3. Shut Down Unnecessary Services and Ports
      4. Apply Patches
      5. Check Security Alerts Regularly
      6. Use Common Sense and Be Vigilant
      7. Cost of Security
    3. Securing the Application Server Control Utility
      1. Changing Default ASC Port
      2. Changing the ASC ias_admin Password
      3. Encrypting the ASC Traffic with SSL
    4. Secure Sockets Layer and Oracle Wallet Manager
      1. Keys
      2. Certificates
      3. Oracle Certificate Authority
      4. Oracle Wallet Manager
      5. Setting Up SSL
    5. Identity Management
      1. User Management Problems
      2. Identity Management Solution
      3. Identity Management Implementation
    6. Summary
  24. 21. Configuring Clustering and Failover
    1. Clustering Overview
      1. Scalable Performance
      2. High Availability
      3. Clustering Definitions
    2. 10g AS Clustering
      1. Architecture
    3. Creating a Farm
      1. Installing an Infrastructure
      2. Joining an Infrastructure
      3. Installing a Mid Tier
    4. Creating Clusters
      1. Creating a Cluster Instance
      2. Adding Members to a Cluster
      3. Configuring Web Cache
    5. Deploying Clustered Applications
    6. Implementing Failover
      1. Failover Test
    7. Summary
  25. A. Server Configuration Files and Document Type Declaration
    1. Server Configuration Files
      1. Location
      2. Files and Descriptions
  26. B. Deployment Descriptors and Document Type Declaration
    1. Deployment Descriptor Files
      1. Location
      2. Files and Descriptions
  27. C. Command-Line Utility Usage
    1. opmnctl Usage
      1. Purpose
      2. Location
      3. Common Usages
      4. Syntax
    2. dcmctl Usage
      1. Purpose
      2. Location
      3. Common Usages
      4. Syntax
    3. emctl Usage
      1. Purpose
      2. Location
      3. Common Usages
      4. Syntax
    4. admin.jar Usage
      1. Purpose
      2. Location
      3. Common Usages
      4. Syntax
  28. D. Debugging Tips
    1. 10g AS Application Server Control Utility
      1. Description
    2. 10g AS Application Server Control Logging
      1. Description
    3. Logging and Debugging Options within OC4J
      1. Logging
      2. Debug Switches