Thursday, September 20, 2012

Set up Oracle AQ (Advanced Queuing) in Weblogic

Problem:

A Portal component,SECURE_MESSAGE, uses Oracle Advanced Queue to communicate with IB.
2 Queues: 1 Sending Queue for sending message
1 Receiving Queue for listening and receiving messages.
The Queues are configured in IB Oracle 11g database.

Portal component uses Spring framework to build the Portlets. Packaged ear file deploys in the Weblogic 11G (10.3.6) container.

We need to configure the queues so that Spring, Weblogic, and Oracle AQ can all work together.

Solution:

Solution is really described in this link:
http://docs.oracle.com/cd/E23943_01/web.1111/e13738/aq_jms.htm

In summary:

AQ JMS uses a database connection and stored JMS messages in a database accessible to an entire WebLogic Server cluster . WebLogic Server installation includes all the necessary classes, no additional files are required in the WebLogic Server classpath.to interoperate with Oracle AQ JMS.

WebLogic AQ JMS uses the WebLogic JMS Foreign Server framework to allow clients to lookup AQ JMS connection factories and destinations using a standard WebLogic JNDI context, and to allow applications and clients to load and invoke AQ JMS using standard Java EE APIs. The required references to the database, JDBC driver, and data source are configured as part of this framework.

For applications running within the WebLogic Server's JVM:

(1) create a WebLogic Data Source.
It references a JDBC driver, pools JDBC connections, and provides connectivity to the Oracle database hosting AQ JMS.

(2) create a WebLogic Foreign Server. It references the data source.

(3) create AQ JMS connection factories and destinations as part of the WebLogic JMS Foreign Server configuration. Local JNDI names are defined for the connection factories and destinations. These JNDI names are configured to map to existing AQ connection factories and destinations.

(4) In turn, WebLogic Server applications, such as MDBs, reference the local JNDI names.




No comments:

Post a Comment