Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide 10g (10.1.3.5.0) Part Number E13981-01 |
|
|
View PDF |
To configure a J2CA resource adapter such as the Oracle JMS Connector (see "Oracle JMS Connector: J2EE Connector Architecture (J2CA)-Based Provider") for use with your message service provider, you must do the following:
Install and configure the J2CA adapter (see "Installing and Configuring a J2CA Adapter").
Choose appropriate JNDI names for your connection factory (see "J2CA Message Service Provider Connection Factory Names").
Configure the appropriate deployment XML files (see "Configuring OC4J J2CA Resource Adapter Deployment XML Files").
Using these deployment XML files, you can specify factories that are either not XA-compliant, when two-phase commit (2PC) transactions are not needed, or XA-compliant, when 2PC transactions are needed. For more information on 2PC, see "How do You Participate in a Global or Two-Phase Commit (2PC) Transaction?".
Configure your message-driven beans to access your message service provider using your J2CA resource adapter.
For more information, see the following:
Note:
Oracle recommends that you access a message service provider using a J2CA resource adapter such as the Oracle JMS Connector. For more information, see "Restrictions When Accessing a Message Service Provider Without a J2CA Resource Adapter".Note:
For a complete code example of configuring a J2CA message service provider resource adapter and MDB application, seehttp://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-gjra-with-oracleasjms/doc/how-to-gjra-with-oracleasjms.html
.The actual JNDI names for the destination and connection factory depend on your J2CA installation as defined in your oc4j-connectors.xml
file (see "Configuring OC4J J2CA Resource Adapter Deployment XML Files").
Typically, it will be composed of java:<Prefix>/<FactoryName>
where <Prefix>
is an optional JNDI location like comp/env/eis
, and <FactoryName>
is the name of the javax.cci.ConnectionFactory
for your adapter.
OC4J includes the Oracle JMS Connector: a generic JMS J2CA resource adapter that integrates OC4J with OEMS JMS and OEMS JMS Database message service providers, as well as non-Oracle JMS providers such as WebSphereMQ, Tibco, and SonicMQ.
For more information, see the following:
"Overview: Administering Resource Adapters" in the Oracle Containers for J2EE Resource Adapter Administrator's Guide.
"Oracle JMS Connector: J2EE Connector Architecture (J2CA)-Based Provider".
To configure a J2CA message service provider, you must configure the following deployment XML files:
ra.xml
oc4j-ra.xml
oc4j-connectors.xml
Using these deployment XML files, you can specify factories that are either not XA-compliant, when two-phase commit (2PC) transactions are not needed, or XA-compliant, when 2PC transactions are needed. For more information on 2PC, see "How do You Participate in a Global or Two-Phase Commit (2PC) Transaction?".
For more information, see the following:
"Binding and Configuring a Connection Factory: Basic Settings" in the Oracle Containers for J2EE Resource Adapter Administrator's Guide
"OC4J Resource Adapter Configuration Files" in the Oracle Containers for J2EE Resource Adapter Administrator's Guide