JMS Configuration In WebLogic
In this article we will discuss about JMS Messaging Bridge Configuration in a WebLogic Domain:
Assumptions:
Here “jms-notrans-wl10” is taken as the default adapter created for JMS Messaging Bridge with default QOS selected as “Exactly-Once”.
WebLogic domain configuration:
1. We will be configuring 1 JMS server targeted to Admin, and another targeted to Managed server
2. Create JMS Module targeted to Admin Server. Inside this JMS module create below resources.
a) JMS Connection Factory (default targeting)
b) JMS Sub Deployment targeted to JMS server which is targeted to Admin Server
c) JMS Queue targeted to Sub Deployment created in above step
3. Create JMS Module targeted to Managed Server. Inside this JMS module create below resources.
a) JMS Connection Factory (default targeting)
b) JMS Sub Deployment targeted to JMS Server which is targeted to Managed Server
c) JMS Queue targeted to JMS Sub Deployment created in above step
4. Create JMS Bridge Destination for Admin Server Queue with below details. For creating JMS Bridge Destination Click on left Panel in console go to Services -> Messaging -> Bridges.
a) Leave Adapter JNDI default name as is to “eis.jms.WLSConnectionFactoryJNDINoTX” and Intial Context Factory as default to “weblogic.jndi.WLInitialContextFactory”
b) For Connection URL specify t3 listen address of Admin server for eg. t3://localhost:7001
c) For Connection Factory JNDI Name specify the Connection Facroty JNDI Name which is part of JMS Module targeted to Admin Server
d) For Destination JNDI Name select JMS Queue JNDI name which is part of JMS Module targeted to Admin Server
e) Select Destination Type as “Queue”.
5. Create JMS Bridge Destination for Managed Server Queue same as above steps. Below are details.
a) Leave Adapter JNDI name as is as default to “eis.jms.WLSConnectionFactoryJNDINoTX” and Intial Context Factory as default to “weblogic.jndi.WLInitialContextFactory”
b) For Connection URL specify t3 listen address of Managed server for eg. t3://localhost:7002
c) For Connection Factory JNDI Name specify the Connection Facroty JNDI Name which is part of JMS Module targeted to Managed Server
d) For Destination JNDI Name select JMS Queue JNDI name which is part of JMS Module targeted to Managed Server
e) Select Destination Type as “Queue”
6. Now we will configure JMS Messaging Bridge which will pick up the messages from JMS Queue on Managed Server and will forward them to JMS Queue on Admin Server.
For this we have to select source destination of JMS Bridge as Managed server Queue and target destination as Admin Server queue. Create JMS Messaging Bridge with below details.
a) Select “Started” checkbox when creating JMS Bridge
b) For “Existing Source Destination” select the JMS Bridge Destination created for Managed server in above step).
c) Leave Messaging Provider as is to default as “WebLogic Server 7.0 or higher”
d) For “Existing Target Destination” select the JMS Bridge Destination created for Admin server in above step).
e) target the Messaging Bridge to Managed server.
f) Once Messaging Bridge is created click on it and select checkbox for “QOS Degradation Allowed” and save the changes.
7. After above configuration you will see “jms-notrans-wl10” resource adapter deployed on Managed Server which is used by JMS Messaging Bridge. Restart your Domain Admin and Managed Server after above configuration.
Validating the JMS Bridge Configuration
1. Once the JMS Bridge Configuration is complete using the above steps and the servers are restarted, login to console to check the JMS Messaging Bridge Status.
2. From the Administration console, click on JMS Messaging Bridge and go to Monitoring tab. The state of Bridge should be reported as “Active” and Description as “Forwarding messages.” This means that the JMS Bridge configuration is successful, up and active in forwarding messages.
3. In this sample use case, JMS Bridge targeted to Managed server is picking messages from Managed Server JMS Queue and forwarding them to Admin Server JMS Queue.
Below are JMS Messaging Bridge -Dweblogic debug flags which can be enabled for debugging in case of issues.
-Dweblogic.debug.DebugMessagingBridgeRuntime=true -Dweblogic.debug.DebugMessagingBridgeRuntimeVerbose=true -Dweblogic.debug.DebugMessagingBridgeStartup=true
With above JMS Messaging Debug flags enabled, the following debug information should be logged after restarting the server indicating that the “Bridge has started transferring messages”.
####<Apr 21, 2012 11:27:29 AM EDT> <Debug> <MessagingBridgeRuntime> <oracletesting1> <msapp1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <> <> <1302877649262> <BEA-000000> <Bridge Bridge-0 WorkMode = Exactly-once> ####<Apr 21, 2012 11:27:29 AM EDT> <Info> <MessagingBridge> <oracletesting1> <msapp1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <> <> <1302877649262> <BEA-200030> <Bridge "Bridge-0" is configured to work in "Exactly-once" mode, and it is actually working in "Exactly-once" mode.> ####<Apr 21, 2012 11:27:29 AM EDT> <Info> <MessagingBridge> <oracletesting1> <msapp1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <> <> <1302877649263> <BEA-200028> <The bridge "Bridge-0" has started transferring messages.> ####<Apr 21, 2012 11:27:29 AM EDT> <Debug> <MessagingBridgeRuntimeVerbose>
Testing JMS Bridge Configuration
1. To test JMS Messaging Bridge configuration messages can be posted to the JMS Queue of the Managed server (origin destination). The messages should be picked up by JMS Messaging bridge and should be forwarded to JMS Queue on Admin Server (target destination).
2. To check the JMS Messaging Bridge functionality once messages are posted to Managed server queue, click on Admin Server JMS Queue and go to monitoring to check if same number of posted messages are present in Admin Server queue.
In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.