Skip Headers
Oracle® Application Server Containers for J2EE Services Guide
10g Release 2 (10.1.2) for Windows or UNIX
  Go To Documentation Library
Go To Product List
Solution Area
Go To Index



Title and Copyright Information

Send Us Your Comments


Intended Audience
Documentation Accessibility
Related Documents

1 Introduction to OC4J Services

Java Naming and Directory Interface (JNDI)
Java Message Service (JMS)
Remote Method Invocation (RMI)
Data Sources
Java Transaction API (JTA)
J2EE Connector Architecture (J2CA)
Java Object Cache

2 Java Naming and Directory Interface

Initial Context
Constructing a JNDI Context
The JNDI Environment
Creating the Initial Context in OC4J
From J2EE Application Clients
Environment Properties
Accessing Objects from an Application Client
From J2EE Application Components
Objects in the Same Application
Objects Not in the Same Application
JNDI State Replication
Enabling JNDI State Replication
JNDI State Replication Limitations
Multiple Islands on a Given Subnet
Propagating Changes Across the Cluster
Binding a Remote Object
JNDI Lookups in a Multiple-Instance Environment

3 Java Message Service (JMS)

Oracle Application Server JMS
Configuring OracleAS JMS Ports
Configuring OracleAS JMS Destination Objects
Default Destination Objects
Default Connection Factories
Steps for Sending a Message
Steps for Receiving a Message
OracleAS JMS Utilities
OracleAS JMS File-Based Persistence
Enabling Persistence
Abnormal Termination
Predefined OracleAS JMS Exception Queue
Message Expiration
Message Paging
OracleAS JMS Configuration File Elements for jms.xml
OracleAS JMS System Properties
Resource Providers
Configuring a Custom Resource Provider
Oracle JMS
Using OJMS as a Resource Provider
Install and Configure the JMS Provider
Create User and Assign Privileges
Create JMS Destination Objects
Define the OJMS Resource Provider
Access the OJMS Resources
Using OJMS with Oracle Application Server and the Oracle Database
Error When Copying aqapi.jar
OJMS Certification Matrix
Map Logical Names in Resource References to JNDI Names
JNDI Naming for OracleAS JMS
JNDI Naming for OJMS
JNDI Naming Property Setup for Java Application Clients
Client Sends JMS Message Using Logical Names
Third-Party JMS Providers
Using WebSphere MQ as a Resource Provider
Configuring WebSphere MQ
Using SonicMQ as a Resource Provider
Configuring SonicMQ
Using SwiftMQ as a Resource Provider
Configuring SwiftMQ
Using Message-Driven Beans
High Availability and Clustering for JMS
OracleAS JMS High Availability Configuration
OracleAS JMS Server Distributed Destinations
Cold Failover Cluster
OracleAS Dedicated JMS Server
Modifying the OPMN Configuration
Configuring OracleAS JMS
Queue Connection Factory Definition Example
Deploying Applications
High Availability
OJMS High Availability Configuration
Failover Scenarios When Using a RAC Database With OJMS
Using JMS with RAC Network Failover
Using OJMS With Transparent Application Failover (TAF)
Server Side Sample Code for Failover for Both JMS Providers
Clustering Best Practices

4 Data Sources

Types of Data Sources
Emulated Data Sources
Nonemulated Data Sources
Native Data Sources
Mixing Data Sources
Defining Data Sources
Configuration Files
Defining Location of the Data Source XML Configuration File
Application-Specific Data Source XML Configuration File
Data Source Attributes
Defining Data Sources in Oracle Enterprise Manager 10g
Defining Data Sources in the XML Configuration File
Fatal Error Code Enhancement
Password Indirection
Configuring an Indirect Password with Oracle Enterprise Manager 10g
Configuring an Indirect Password Manually
Associating a Database Schema with a Data Source
The database-schema.xml File
Example Configuration
Using Data Sources
Portable Data Source Lookup
Retrieving a Connection from a Data Source
Retrieving Connections with a Nonemulated Data Source
Retrieving a Connection Outside a Global Transaction
Retrieving a Connection Within a Global Transaction
Connection Retrieval Error Conditions
Using Different User Names for Two Connections to a Single Data Source
Improperly configured OCI JDBC Driver
Using Two-Phase Commits and Data Sources
Using Oracle JDBC Extensions
Using Connection Caching Schemes
Using the OCI JDBC Drivers
Notes on Oracle JDBC-OCI driver upgrade in the Oracle Application Server
Using DataDirect JDBC Drivers
Installing and Setting Up DataDirect JDBC Drivers
Example DataDirect Data Source Entries
High Availability Support for Data Sources
Oracle Maximum Availability Architecture (MAA)
Oracle Data Guard
Real Application Clusters (RAC)
Network Failover
TAF Failover
High Availability (HA) Support in OC4J
Configuring Network Failover with OC4J
Configuring Transparent Application Failover (TAF) with OC4J
Configuring a TAF Descriptor (tnsnames.ora)
Connection Pooling
Acknowledging TAF Exceptions
SQL Exception Handling

5 Oracle Remote Method Invocation

Introduction to RMI/ORMI
ORMI Enhancements
Increased RMI Message Throughput
Enhanced Threading Support
Co-Located Object Support
Client-Side Requirements
Configuring OC4J for RMI
Configuring RMI Using Oracle Enterprise Manager 10g
Configuring RMI Manually
Editing server.xml
Editing rmi.xml
Editing opmn.xml
RMI Configuration Files
JNDI Properties for RMI
Naming Provider URL
Context Factory Usage
Example Lookups
OC4J Standalone
OC4J in Oracle Application Server: Releases Before 9.0.4
OC4J in Oracle Application Server Since 9.0 4
Configuring ORMI Tunneling through HTTP
Configuring an OC4J Mount Point
Configuring ORMI over HTTP in a Clustered Application

6 J2EE Interoperability

Introduction to RMI/IIOP
Client-Side Requirements
The rmic.jar Compiler
Switching to Interoperable Transport
Simple Interoperability in a Standalone Environment
Advanced Interoperability in a Standalone Environment
Simple Interoperability in Oracle Application Server Environment
Configuring for Interoperability Using Oracle Enterprise Manager 10g
Configuring for Interoperability Manually
Advanced Interoperability in Oracle Application Server Environment
Configuring for Interoperability Using Oracle Enterprise Manager 10g
Configuring for Interoperability Manually
The corbaname URL
Exception Mapping
Invoking OC4J-Hosted Beans from a Non-OC4J Container
Configuring OC4J for Interoperability
Interoperability OC4J Flags
Interoperability Configuration Files
JNDI Properties for Interoperability (
Context Factory Usage
Enabling IIOP in OC4J

7 Java Transaction API

Demarcating Transactions
Enlisting Resources
Single-Phase Commit
Enlisting a Single Resource
Configure the Data Source
Retrieve the Data Source Connection
Perform JNDI Lookup
Retrieve a Connection
Demarcating the Transaction
Container-Managed Transactional Demarcation
Bean-Managed Transactions
JTA Transactions
JDBC Transactions
Two-Phase Commit
Configuring Two-Phase Commit Engine
Database Configuration Steps
OC4J Configuration Steps
Limitations of Two-Phase Commit Engine
Configuring Timeouts
Recovery for CMP Beans when a Database Instance Fails
Connection Recovery for CMP Beans That Use Container-Managed Transactions
Connection Recovery for CMP Beans That Use Bean-Managed Transactions
Using Transactions With MDBs
Transaction Behavior for MDBs Using OC4J JMS
Transaction Behavior for MDBs Using Oracle JMS
MDBs that Use Container-Managed Transactions
MDBs that Use Bean-Managed Transactions and JMS Clients

8 J2EE Connector Architecture (J2CA)

Resource Adapters
Standalone Resource Adapters
Embedded Resource Adapters
Example of RAR File Structure
The ra.xml Descriptor
Application Interface
Quality of Service Contracts
Deploying and Undeploying Resource Adapters
Deployment Descriptors
The oc4j-ra.xml Descriptor
The oc4j-connectors.xml Descriptor
Standalone Resource Adapters
Embedded Resource Adapters
Locations of Relevant Files
Specifying Quality of Service Contracts
Configuring Connection Pooling
Managing EIS Sign-On
Component-Managed Sign-On
Container-Managed Sign-On
Declarative Container-Managed Sign-On
Programmatic Container-Managed Sign-On
OC4J-Specific Authentication Classes
JAAS Pluggable Authentication Classes
Special Features Accessible Via Programmatic Interface

9 Java Object Cache

Java Object Cache Concepts
Java Object Cache Basic Architecture
Distributed Object Management
How the Java Object Cache Works
Cache Organization
Java Object Cache Features
Java Object Cache Object Types
Memory Objects
Disk Objects
StreamAccess Objects
Pool Objects
Java Object Cache Environment
Cache Regions
Cache Subregions
Cache Groups
Region and Group Size Control
Cache Object Attributes
Using Attributes Defined Before Object Loading
Using Attributes Defined Before or After Object Loading
Developing Applications Using Java Object Cache
Importing Java Object Cache
Defining a Cache Region
Defining a Cache Group
Defining a Cache Subregion
Defining and Using Cache Objects
Implementing a CacheLoader Object
Using CacheLoader Helper Methods
Invalidating Cache Objects
Destroying Cache Objects
Multiple Object Loading and Invalidation
Java Object Cache Configuration
Declarative Cache
Declarative Cache File Sample
Declarative Cache File Format
Declarable User-Defined Objects
Declarable CacheLoader, CacheEventListener, and CapacityPolicy
Initializing the Java Object Cache in a Non-OC4J Container
Capacity Control
Implementing a Cache Event Listener
Restrictions and Programming Pointers
Working with Disk Objects
Local and Distributed Disk Cache Objects
Local Objects
Distributed Objects
Adding Objects to the Disk Cache
Automatically Adding Objects
Explicitly Adding Objects
Using Objects that Reside Only in Disk Cache
Working with StreamAccess Objects
Creating a StreamAccess Object
Working with Pool Objects
Creating Pool Objects
Using Objects from a Pool
Implementing a Pool Object Instance Factory
Pool Object Affinity
Running in Local Mode
Running in Distributed Mode
Configuring Properties for Distributed Mode
Setting the distribute Configuration Property
Setting the discoveryAddress Configuration Property
Using Distributed Objects, Regions, Subregions, and Groups
Using the REPLY Attribute with Distributed Objects
Cached Object Consistency Levels
Using Local Objects
Propagating Changes Without Waiting for a Reply
Propagating Changes and Waiting for a Reply
Serializing Changes Across Multiple Caches
Sharing Cached Objects in an OC4J Servlet
Using User-Defined Class Loaders
HTTP and Security for Distributed Cache
Restricting Incoming Connections
Monitoring and Debugging
XML Schema for Cache Configuration
XML schema for attribute declaration