Skip Headers
Oracle® Containers for J2EE Developer's Guide
10
g
(10.1.3.1.0)
Part Number B28952-01
Home
Book List
Index
Contact Us
Next
View PDF
Contents
List of Figures
List of Tables
Title and Copyright Information
Preface
Intended Audience
Documentation Accessibility
Related Documents
Conventions
1
Getting Started with OC4J
Introduction to OC4J
J2EE Support in OC4J
New Features in OC4J
Support for Web Services
Support for J2EE 1.4 Application Management and Deployment Specifications
Support for Oracle Application Server TopLink
OracleAS Job Scheduler
Two-Phase Commit Transaction Coordinator Functionality
Generic JMS Resource Adapter Enhancements
Support for the Enterprise JavaBeans 3.0
Support for the <library-directory> Element
Information in the OC4J Documentation Set
OC4J Installation
2
Developing Startup and Shutdown Classes
Developing Startup Classes
Developing Shutdown Classes
3
Utilizing the OC4J Class Loading Framework
Class Loading in OC4J
Overview of Class Loading
Class Versioning with Shared Libraries in OC4J
Shared Libraries That Applications Import by Default
Configuring an Application to Import a Nondefault Version of a Shared Library
Example: Importing an Earlier Version of the Oracle JDBC Driver
Example: Configuring an Application to Use a DataDirect JDBC Driver
Removing or Replacing an Oracle Shared Library Imported by Default
Example: Replacing the Oracle XML Parser with the Xerces Parser
Example: Removing an Oracle Shared Library at Deployment Time
Using a Packaged JAR Instead of an Oracle Shared Library
Configuring an Application to Use Its Own Shared Library
Specifying search-local-classes-first at Deployment Time
Installing and Publishing a Shared Library in OC4J
When You Should Use a Shared Library
Options for Installing and Publishing a Shared Library
How a Shared Library Is Installed and Published in an OC4J Instance
Configuring an Application to Import a Shared Library
Declaring Dependencies in an Application's OC4J Deployment Descriptor
Declaring Dependencies in an Application's Manifest File
Configuring All Deployed Applications to Import a Specific Shared Library
Sharing Libraries Using the applib Directory
Specifying a Library Directory in application.xml
Best Practices for Class Loading
Troubleshooting Class-Loading-Related Problems in OC4J
Overview of Troubleshooting
Class Loading Errors and Exceptions
ClassNotFoundException
NoClassDefFoundError
ClassFormatError
LinkageError
ClassCastException
Using Queries to Troubleshoot Class Loading Issues
Summary of Available Class Loader Queries
Executing Queries at OC4J Startup
Executing Queries at Runtime Through the ClassLoading MBean
Tracing Class Loading Events to Help Troubleshoot Issues
Using Filters to Manage Trace Output
Setting Class Loader Log Levels
4
Logging Implementation Guidelines
Overview of the Java and Oracle Logging Frameworks
The Java Logging Framework
The Oracle Diagnostic Logging Framework
How Java Logging and Oracle Diagnostic Logging Work Together
Java Logging Guidelines
Naming Java Loggers
Setting Log Levels
Adding Localization Support
Configuring Java Loggers to Use the ODL Framework
5
Creating MBeans to Manage Your Applications
Overview of MBeans
Types of MBeans Supported by OC4J
Unsupported Methods in JMX MBeanServer and MBeanServerConnection Interfaces
Packaging Your MBeans for Deployment
Defining MBeans in orion-application.xml
Initializing MBean Attributes
Registering Your MBeans with the OC4J MBeanServer
Defining MBeans in an Application Descriptor
Defining MBeans in a Deployment Plan
Programmatically Registering MBeans Through Application Code
Providing Management Access to Application-Defined MBeans
Prerequisite: Add User to Security Group
Remote Management Using the JMX Remote API (JSR-160)
Connecting to the OC4J MBeanServer
Connecting to an Application-Specific MBean Server
Connecting to a Specific Application's JMX Domain
Setting the JMX Service URI for an OPMN-Managed OC4J Instance
Setting a Secure JMX Service URI for an OPMN-Managed OC4J Instance
Setting the JMX Service URI for a Standalone OC4J Instance
Setting a Secure JMX Service URI for a Standalone OC4J Instance
Setting a Locale
Enabling HTTP Tunneling
Remote Management Using the Management EJB (JSR-77)
Accessing the MEJB from a J2EE Application Client
Accessing the MEJB from a Servlet or EJB
Sample MBean
UserManagerMBean Interface
UserManager Implementation Class
Adding Localization Support to Your MBeans
Localization Support Provided by Oracle
Using Resource Bundles to Localize MBean Metadata
Adding Localization Support to Your MBeans
6
Working with Open Source Frameworks
Installing Open Source Libraries in OC4J
Removing Imported Oracle Shared Libraries to Avoid Conflicts
Using Jakarta Struts
Overview of Jakarta Struts
Struts Support in Oracle JDeveloper
Accessing the Struts Binary Distribution
Using the Spring Framework
Overview of the Spring Framework
Oracle TopLink Support in Spring 1.2
Downloading the Spring Framework Distribution
Using Apache MyFaces
Overview of MyFaces
Accessing the MyFaces Distribution
Building JSPs Using MyFaces for Deployment into OC4J
JDeveloper Support for MyFaces
Using Hibernate
Accessing the Hibernate Binaries
Using Hibernate with Applications in OC4J
Using Apache Axis
Accessing the Axis Distribution
Using the Xerces Parser XML Parser
Using Oracle-Based and Axis-Based Web Services in OC4J
Configuring and Using Jakarta log4j
Overview of Jakarta log4j
Downloading the log4j Binary Distribution
Using log4j Configuration Files
Using the Default Files for Automatic log4j Configuration
Using Alternative Files for Automatic log4j Configuration
Programmatically Specifying External Configuration Files
Enabling log4j Debug Mode in OC4J
7
Packaging an Application for Deployment into OC4J
Overview of J2EE Application Packaging
J2EE Application Structure Within OC4J
Application Module (EAR File and WAR File) Structures
Sample EAR File
Sample WAR File
Packaging Deployment Descriptors
Deployment Descriptors Overview
Packaging a J2EE Standard Application Descriptor (application.xml)
Packaging an OC4J-Specific Application Descriptor (orion-application.xml)
8
Using J2EE Best Practices
JavaServer Pages Best Practices
Beware of HTTP Sessions
Avoid Using HTTP Sessions
Always Invalidate Sessions When No Longer in Use
Pretranslate JSP Pages Using the ojspc Utility
Unbuffer JSP Pages
Forward to JSP Pages Instead of Using Redirects
Hide JSP Pages from Direct Invocation to Limit Access
Use JSP-Timeout for Efficient Memory Utilization
Package JSP Files in an EAR File for Deployment
Class Loading Best Practices
Sessions Best Practices
Persist Session State If Appropriate
Do Not Store Shared Resources in Sessions
Set Session Timeout Appropriately
Monitor Session Memory Usage
Use a Mix of Cookies and Sessions
Use Coarse Objects Inside HTTP Sessions
Use Transient Data in Sessions Whenever Appropriate
Invalidate Sessions
Miscellaneous Guidelines
Enterprise JavaBeans Best Practices
Use Local, Remote, and Message-Driven EJBs When Appropriate
Use EJBs Judiciously
Use a Service Locator Pattern
Cluster Your EJBs
Index Secondary Finder Methods
Understand the Lifecycle of EJBs
Use Deferred Database Constraints
Create a Cache with Read-Only EJBs
Pick an Appropriate Locking Strategy
Understand and Leverage Patterns
When Using Entity Beans, Use Container-Managed Aged Persistence Whenever Possible
Entity Beans Using Local interfaces Only
Use a Session Bean Facade for Entity Beans
Enforce Primary Key Constraints at the Database Level
Use a Foreign Key for 1-1 or 1-M Relationships
Avoid the findAll() Method on Entities Based on Large Tables
Set prefetch-size to Reduce Round Trips to Database
Use Lazy Loading with Caution
Avoid Performing O-R Mapping Manually
A
OC4J-Specific Deployment Descriptors
Elements in the orion-application.xml File
Elements in the orion-application-client.xml File
B
Third Party Licenses
ANTLR
The ANTLR License
Apache
The Apache Software License
Apache SOAP
Apache SOAP License
DBI Module
Perl Artistic License
Preamble
Definitions
FastCGI
FastCGI Developer's Kit License
Module mod_fastcgi License
Info-ZIP Unzip Package
The Info-ZIP Unzip Package License
JSR 110
Jaxen
The Jaxen License
JGroups
The GNU License
mod_mm and mod_ssl
OpenSSL
OpenSSL License
Perl
Perl Kit Readme
mod_perl 1.29 License
mod_perl 1.99_16 License
Perl Artistic License
Preamble
Definitions
SAXPath
The SAXPath License
W3C DOM
The W3C License
Index