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
When configuring an AQ JMS foreign destination, you need to configure the following:
■
Local JNDI name—the name that WLS uses to bind the destination into the WebLogic JNDI tree. The local JNDI name must be unique so that it doesnt
conflict with any other JNDI names advertised on the local WebLogic Server instance.
■
Remote JNDI name—the name that WLS passes to AQ JMS to do a lookup. AQ JMS requires the Remote JNDI name to be in the following syntax:
– If the destination is a queue, the remote JNDI name must be Queuesqueue
name .
– If the destination is a topic, the remote JNDI name must be Topicstopic
name Similar to connection factories, AQ JMS destinations require a remote JNDI name with
a prefix to identify the JMS object type. There are two values for destinations:
Unlike AQ JMS connection factory JNDI names, the value for the destination name represents the AQ JMS destination defined in the database. See
Chapter 7.2.1.3, Create a JMS Queue or Topic.
For example, consider the two destinations configured for an AQ JMS Foreign Server in the following table:
Table 7–3 AQ JMS Prefix Value of the JMS Interface
AQ JMS Prefix Value JMS Interface
Queues Javax.jms.Queue
Topics javax.jms.Topic
Table 7–4 Example AQ JMS Foreign Server Destinations
Local JNDI Name Remote JNDI Name
jmsmyQueue QueuesuserQueue
AqTopic TopicsmyTopic
Interoperating with Oracle AQ JMS 7-9
A WebLogic application looking up the location jmsmyQueue references the AQ JMS queue defined by userQueue. Looking up the location AqTopic references the AQ
JMS topic defined by myTopic.
See:
■
Section 4.4.2.1, Creating Foreign Connection Factory Resources
■
Create foreign destinations in Oracle WebLogic Server Administration Console Help.
7.3 Programming Considerations
The following sections provide information on advanced WebLogic AQ JMS topics:
■
Section 7.3.1, Message Driven Beans
■
Section 7.3.2, AQ JMS Extensions
■
Section 7.3.3, Resource References
■
Section 7.3.4, JDBC Connection Utilization
■
Section 7.3.5, Oracle RAC Support
■
Section 7.3.6, Debugging
■
Section 7.3.7, Performance Considerations
7.3.1 Message Driven Beans
MDBs interoperate with AQ JMS by using a configured foreign server. See Section 7.2.2.3, Configure a JMS Foreign Server.
The message driven parameters initial-context-factory and provider-url are not supported as these
parameters are supplied as part of the JMS Foreign Server configuration. The destination type for the MDB destination in the ejb-jar.xml file should be
configured to either: javax.jms.Queue or javax.jms.Topic. Additional MDB configuration is required to enable container managed transactions, durable topic
subscriptions, and other MDB features.
SeeProgramming Message-Driven Beans for Oracle WebLogic Server.
7.3.2 AQ JMS Extensions
AQ JMS extension APIs are supported by AQ JMS specific classes. You can invoke the AQ JMS extensions, after casting the standard JMS objects such as connection
factories and destinations to proprietary AQ JMS classes.
When you use resource references for a AQ JMS connection factory, WebLogic Server wraps the underlying AQ JMS connection factory with a wrapper object. This wrapper
object implements the JMS standard API, but it cannot cast it to an AQ JMS class which provides AQ JMS extension APIs. To avoid the wrapping, users can specify the
java.lang.Object as the resource type of the resource reference instead of javax.jms.XXXConnectionFactory in the deployment descriptor. This limitation
is specific to AQ JMS, as resource references only support extensions that are exposed using Java interfaces. AQ JMS does not define Java interfaces for its extensions. With
AQ JMS, avoiding wrapping does not disable automatic JTA transaction enlistment, nor does it prevent pooling, as AQ JMS obtains these capabilities implicitly through its
embedded use of WebLogic data sources.