Thursday, January 22, 2015

ActiveMQ Setup in Weblogic for OSB

I had a requirement where i needed a ActiveMQ configured in the same box as my weblogic server.I need to publish messages and subscribe as well.
I am not publishing the Business service details > below are the steps needed to set up the Active MQ and Weblogic connectivity.


Add activemq-all-5.9.1.jar to the WebLogic $Domain(in our case OSBDomain)/lib folder

Add

set PRE_CLASSPATH=%DOMAIN_HOME%\lib\activemq-all-5.9.1.jar;%PRE_CLASSPATH%   in the setDomainEnv.cmd.


Create a JMS Module : ABCModule

Create Foreign Server Name: xxxxx

General tab

JNDI Initial Context Factory: org.apache.activemq.jndi.ActiveMQInitialContextFactory
JNDI Connection URL: tcp://localhost:61616

Destinations Tab

Name: TestQueue
Local JNDI Name: TestQueue
Remote JNDI Name: dynamicQueues/TestQueue (I tried with a normal queue, but it didn't work. So used dynamicQueues here. Will try with other queue also)

Connection Factories Tab
Name: AMQConnectionFactory
Local JNDI Name: AMQConnectionFactory
Remote JNDI Name: ConnectionFactory


OSB Business Service:

Use URI as jms://localhost:7001/AMQConnectionFactory/TestQueue

Enjoy..




1 comment:

  1. [JMSPool:169803]JNDI lookup of the JMS connection factory AMQConnectionFactory failed: javax.naming.NoInitialContextException: Cannot instantiate class: org.apache.activemq.jndi.ActiveMQInitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.apache.activemq.jndi.ActiveMQInitialContextFactory]

    ReplyDelete