Some Advantages of having a JMS bridge between Weblogic and MQ series listener is even though the destination application is down, bridge will manage the messages by its built in capacity.
- Bridge has capacity of retry, transaction management.
- When destination application has some downtime bridge will cache the messages and re-send it when the destination application comes up.
- It will automatically detect start/stop of destination application.
- It is guaranteed delivery pattern
Process for creating the JMS bridge.
- Login to Weblogic console through browser
- Create a queue required for collection of messages from source end(QueueJndi).
- navigate Services → Messaging → Bridges → JMS Bridge Destinations(click new)
- first time you will get few properties only, fill them and then edit the destination again to refill the remaining properties.
- Name Value
Name sourceDestinationQueue
Adapter JNDI Name eis.jms.WLSConnectionFactoryJNDIXA
Classpath
Connection URL t3://[host]:[port]{ex t3://localhost:7001}
Initial Context Factory weblogic.jndi.WLInitialContextFactory
Connection Factory JNDI Name JMSCF_JNDI
Destination JNDI Name QueueJndi
Destination Type Queue
User Name [weblogic username]
User Password [password for the user]
Confirm User Password [same as above password - Click Save
- navigate Services → Messaging → Bridges → JMS Bridge Destinations(click new)
- first time you will get few properties only, fill them and then edit the destination again to refill the remaining properties.
- Name Value
Name targetDestinationQueue
Adapter JNDI Name eis.jms.WLSConnectionFactoryJNDIXA
Classpath
Connection [JMS.BROKER.URL]from destination→ configuration
Initial Context Factory org.apache.activemq.jndi.ActiveMQInitialContextFactory
Connection Factory JNDI Name QueueConnectionFactory
Destination JNDI Name dynamicQueues/daEventQueue
Destination Type Queue
User Name [tomcat username]
User Password [tomcat password for the user]
Confirm User Password [same as above password] - Click save
- navigate Services → Messaging → Bridges
- click new
- Name Value
Name JMS-MQ-Bridge
selector
Quality Of Service Atmost-once
Started checked - Click next
- select source Destination : sourceDestinationQueue
- click next
- select Messaging provider : Weblogic server 7.0 or higher
- click next
- select target Destination :targetDestinationQueue
- click next
- select Messaging provider : Other JMS
- click next
- myserver should be checked
- click next
- click finish
Now bridge is created and deployed to Weblogic - Add following jars into Weblogic CLASSPATH
slf4j-api-1.6.4.jar
activemq-core-5.5.0.jar - Once it is sure the above jars are in the Weblogic CLASSPATH
- restart Weblogic.
cool
ReplyDeleteI have WLS 10.3 and an ActiveMQ broker (embedded in a Tomcat 7)
ReplyDeleteMy source destination is @ WLS and my target destination is @ ActiveMQ.
Don't I need some setup at Tomcat/ActiveMq side? Like jndi, other.
I use Spring DI to construct my activeMQ broker.
Using you conf I get the following.
<Bridge MyBridgeTest failed to connect to the source destination and will try again in 45 seconds. This could be a temporary condition unless the messages repeat several times. (java.lang.Exception: weblogic.jms.bridge.TemporaryResourceException
at weblogic.jms.adapter.JMSBaseConnection.throwTempResourceException(JMSBaseConnection.java:1636)
Sorry for delay not updates blog from long back. but now I am active. is your issue resolved?
ReplyDeleteI am using the same approach to setup bridge between ActiveMQ5 and Weblogic10.3. The given below is the Configuration:
ReplyDeleteSource: has no problem.
Target:
Adapter JNDI Name: eis.jms.WLSConnectionFactoryJNDIXA
Connection URL: tcp://127.0.0.1:61616
Initial Context Factory: org.apache.activemq.jndi.ActiveMQInitialContextFactory
Connection Factory JNDI Name: amqConnectionFactory
Destination JNDI Name: queue/DestinationQueue
Destination Type: Queue
User Name: admin
User Password: xxxxxxx
Confirm User Password: xxxxxxx
I have place the "activemq-all-5.8.0.jar and slf4j-api-1.6.6.jar" but it was unable to connect to the ActiveMQ. I tried with "activeio-core-3.1.4.jar" also, but getting the given below exception:
#### <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <> <> <1380800833216> <Bridge "JMS-ActiveMQ-Bridge" failed to get one of the adapters from JNDI (javax.naming.NameNotFoundException: Unable to resolve 'eis.jms.WLSConnectionFactoryJNDIXA'. Resolved 'eis.jms'; remaining name 'WLSConnectionFactoryJNDIXA').
javax.naming.NameNotFoundException: Unable to resolve 'eis.jms.WLSConnectionFactoryJNDIXA'. Resolved 'eis.jms'; remaining name 'WLSConnectionFactoryJNDIXA'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
Can you please help me on the same?
--
Thanks
What will be the scenario if I don't have bridge?? Is it possible to write MDB classes to listen messages in IBM MQs.??
ReplyDelete