7-6 Configuring and Managing JMS for Oracle WebLogic Server
– Select a XA based JDBC driver for use with AQ JMS in either in global
transactions or in local transactions.
■
When configuring a data source for non-XA drivers, do not select the Supports Global Transactions option. This release does not support non-XA JDBC
driver data sources with any of the global transaction options such as LLR, JTS, and Emulate Two-Phase Commit. If the global transaction option is selected, the
server instance logs a warning message. Global transactions are supported with XA-based JDBC drivers.
■
Configure the database user name and password in the data source connection pool configuration. Identity-based connection pools are not supported.
See:
■
Configuring JDBC Data Sources in Configuring and Managing JDBC Data Sources for Oracle WebLogic Server.
■
Create JDBC data sources in Oracle WebLogic Server Administration Console Help.
7.2.2.1.1 Data Source Tuning Oracle recommends setting
shrink-frequency-seconds to a small value in Oracle RAC environments. For example: shrink-frequency-seconds=10
In the event of a failed connection, this allows a data source to remove the failed connection. See:
■
JDBC Data Source: Configuration: Connection Pool in Oracle WebLogic Server Administration Console Help.
■
Using WebLogic Server with Oracle RAC in Configuring and Managing JDBC Data Sources for Oracle WebLogic Server.
7.2.2.2 Configure a JMS System Module
Configure a dedicated JMS system module to host a JMS foreign server for AQ resources. Target the module at the WebLogic Server instances or the cluster that
needs to host the foreign JNDI names. See:
■
Overview of JMS Modules in Configuring and Managing JMS for Oracle WebLogic Server.
■
Create foreign servers in a system module in Oracle WebLogic Server Administration Console Help.
7.2.2.3 Configure a JMS Foreign Server
In your JMS Foreign Server configuration:
■
Specify oracle.jms.AQjmsInitialContextFactory as the JNDI Initial Context Factory.
■
Configure the JDBC data sources needed for your application environment. See:
■
Section 4.4, Configuring Foreign Server Resources to Access Third-Party JMS Providers
■
Configure foreign servers in Oracle WebLogic Server Administration Console Help.
7.2.2.3.1 Reference a Data Source Specify the datasource JNDI property which is the
JNDI location of a locally bound WLS data source.
Interoperating with Oracle AQ JMS 7-7
For Example: foreign-server
initial-context-factoryoracle.jms.AQjmsInitialContextFactoryinitial-context-fa ctory
jndi-property
keydatasourcekey valuejdbcaqjmsdsvalue
jndi-property
foreign-server The value of the datasource JNDI property is the name of the data source
configured to access the AQ JMS Oracle database. No other configuration information is required.
See Section 7.2.2.1, Configure a WebLogic Data Source.
7.2.2.4 Configure JMS Foreign Server Connection Factories
Once you have created a JMS Foreign Server, you can create JNDI mappings for the AQ JMS connection factories in the WebLogic Server JNDI tree. Unlike destinations,
AQ JMS does not require connection factories to be redefined in the Oracle database. Instead, a predefined JNDI name is specified when identifying the remote JNDI name
for a connection factory. The remote JNDI name for the AQ JMS connection factory is one of the following:
For example, consider two connection factories configured for an AQ JMS Foreign Server:
When a WebLogic application looks up a JMS factory at jmsaqmyCF, the application gets the AQ JMS object which implements the JMS
javax.jms.ConnectionFactory interface. When a WebLogic application looks up a JMS factory at aqorderXaTopicFactory, the application gets the AQ JMS object
which implements the JMS javax.jms.XAToicConnectionFactory interface.
To configure a AQ JMS foreign server connection factory, you need to:
■
Specify Local and Remote JNDI names
Table 7–1 Remote JNDI names for AQ JMS Connection Factories
AQ JMS Prefix Value JMS Interface
QueueConnectionFactory javax.jms.QueueConnectionFactory
TopicConnectionFactory javax.jms.TopicConnectionFactory
ConnectionFactory javax.jms.ConnectionFactory
XAQueueConnectionFactory javax.jms.XAQueueConnectionFactory
XATopicConnectionFactory javax.jms.XATopicConnectionFactory
XAConnectionFactory javax.jms.XAConnectionFactory
Table 7–2 AQ JMS Foreign Server Example Connection Factories
Local JNDI Name RemoteJNDI Name
jmsaqmyCF ConnectionFactory
aqjmsorderXaTopicFactory XATopicConnectionFactory
7-8 Configuring and Managing JMS for Oracle WebLogic Server
– The local JNDI name is the name that WebLogic uses to bind the connection
factory into the WebLogic JNDI tree. The local JNDI name must be unique so that it doesnt conflict with an other JNDI name advertised on the local
WebLogic Server.
– The Remote JNDI name is the name that WebLogic passes to AQ JMS to
lookup AQ JMS connection factories. When configuring AQ JMS for use in global transactions, use an XA based
connection factory; otherwise configure a non-XA based connection factory.
■
No other configuration parameters are required. See:
■
Section 4.4.2.1, Creating Foreign Connection Factory Resources
■
Create foreign connection factories in Oracle WebLogic Server Administration Console Help.
7.2.2.5 Configure AQ JMS Foreign Server Destinations