|
Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide
10g Release 3 (10.1.3) B14428-01 |
|
![]() Previous |
![]() Next |
To configure the OracleAS JMS message service provider, you must:
Choose appropriate JNDI names for your destination and connection factory (see "OracleAS JMS Destination and Connection Factory Names").
Configure the <OC4J_HOME>/j2ee/home/config/jms.xml file (see "Configuring jms.xml").
Optionally, map the actual JNDI names to logical names (see "Configuring an Environment Reference to a JMS Destination or Connection Resource Manager Connection Factory").
Associate the OracleAS JMS message service provider with the message-driven beans that will use it.
For more information, see:
For more information about OracleAS JMS, see "Oracle Application Server JMS (OracleAS JMS) Provider: File-Based".
The actual JNDI names for the JMS destination and connection factory are the ones you specify in the jms.xml file (see "Configuring jms.xml").
Table 23-1 lists the form of these names.
You configure OracleAS JMS options in the <OC4J_HOME>/j2ee/home/config/jms.xml file. In 10.1.3, the jms.xml is defined by the XML schema document (XSD) located at http://www.oracle.com/technology/oracleas/schema/jms-server-10_1.xsd.
Some of the options you can configure in the jms.xml file include:
JMS Destination objects used by the MDB.
Topic or queue in the jms.xml file to which the client sends all messages that are destined for the MDB.
The name, location, and connection factory for either Destination type must be specified.
If your MDB accesses a database for inquiries and so on, then you can configure the Data Source used. For information on data source configuration, see the Data Source chapter in the Oracle Containers for J2EE Services Guide.
Path to a file in which OracleAS JMS events and errors are written.
Example 23-1 shows the jms.xml file configuration for an EJB 2.1 MDB that specifies a queue (named jms/Queue/rpTestQueue) that is used by the message-driven bean rpTestMdb (see Example 17-1). The queue connection factory is defined as jms/Queue/myQCF. In addition, a topic is defined named jms/Topic/rpTestTopic, with a connection factory of jms/Topic/myTCF.
Example 23-1 jms.xml For an EJB 2.1 MDB using OracleAS JMS
<jms> <jms-server port="9128"> <queue location="jms/Queue/rpTestQueue"></queue> <queue-connection-factory location="jms/Queue/myQCF"></queue-connection-factory> <topic location="jms/Topic/rpTestTopic"></topic> <topic-connection-factory location="jms/Topic/myTCF"></topic-connection-factory> <log> <!-- path to the log-file where JMS-events and errors are written --> <file path="../log/jms.log" /> </log> </jms-server> </jms>