This discussion is archived
0 Replies Latest reply: Dec 14, 2012 3:23 AM by 853979 RSS

Weblogic Bridge to ActiveMQ

853979 Newbie
Currently Being Moderated
I am currently trying to connect to an activeMQ using a Bridge.

I have the activemq-all-5.6.0.jar in my class path on the start-up of weblogic.

CLASSPATH=/weblogic/Oracle/Middleware/patch_wls1035/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/weblogic/JDK/jdk1.6.0_29/lib/tools.jar:/weblogic/Oracle/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/weblogic/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/weblogic/Oracle/Middleware/modules/features/weblogic.server.modules_10.3.5.0.jar:/weblogic/Oracle/Middleware/wlserver_10.3/server/lib/webservices.jar:/weblogic/Oracle/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/weblogic/Oracle/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/opt/ActiveMQ/activemq-all-5.6.0.jar:/weblogic/Oracle/Middleware/wlserver_10.3/common/derby/lib/derbyclient.jar:/weblogic/Oracle/Middleware/wlserver_10.3/server/lib/xqrl.jar

This is the definition of my Bridge from the server log

####<Dec 14, 2012 10:50:29 AM GMT> <Debug> <MessagingBridgeStartup> <vsl000i031.vspref.adidom.com> <AdminServer> <[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kerne
l.Default (self-tuning)'> <weblogic> <> <> <1355482229704> <BEA-000000> <Bridge IIPToGSDEM's source configurations are:
AdapterJNDIName=eis.jms.WLSConnectionFactoryJNDIXA
Classpath=null
ConnectionURL = tcp://localhost:61616
DestinationType = Queue
DestinationJNDIName = CITOUTBOUND
InitialContextFactory = org.apache.activemq.jndi.ActiveMQInitialContextFactory
ConnectionFactoryJNDIName = QueueConnectionFactory
>
####<Dec 14, 2012 10:50:29 AM GMT> <Debug> <MessagingBridgeStartup> <vsl000i031.vspref.adidom.com> <AdminServer> <[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kerne
l.Default (self-tuning)'> <weblogic> <> <> <1355482229704> <BEA-000000> <Bridge IIPToGSDEM's target configurations are:
AdapterJNDIName=eis.jms.WLSConnectionFactoryJNDIXA
Classpath=
ConnectionURL = t3://localhost:7001
DestinationType = Queue
DestinationJNDIName = INCIDENT_IN_Q_AT_GSD
InitialContextFactory = weblogic.jndi.WLInitialContextFactory
ConnectionFactoryJNDIName = BridgeCF
>

But my connection fails to find the activeMQ name CITOUTBOUND

####<Dec 14, 2012 10:50:29 AM GMT> <Debug> <MessagingBridgeRuntimeVerbose> <vsl000i031.vspref.adidom.com> <AdminServer> <[STANDBY] ExecuteThread: '3' for queue: 'weblog
ic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1355482229710> <BEA-000000> <Exception:
javax.naming.NameNotFoundException: CITOUTBOUND
at org.apache.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:235)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at weblogic.jms.adapter.JMSBaseConnection$3.run(JMSBaseConnection.java:299)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.jms.adapter.JMSBaseConnection.startInternal(JMSBaseConnection.java:297)
at weblogic.jms.adapter.JMSBaseConnection.start(JMSBaseConnection.java:249)

I think this has something to do with the activemq jndi properties

java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory

# use the following property to configure the default connector
java.naming.provider.url = tcp://localhost:61616

# use the following property to specify the JNDI name the connection factory
# should appear as.
connectionFactoryNames = connectionFactory, QueueConnectionFactory, topicConnectionFactry

# register some queues in JNDI using the form
# queue.[jndiName] = [physicalName]
queue.CITOUTBOUND = CIT.OUTBOUND
queue.EMINBOUND = EM.INBOUND
queue.EMOUTBOUND = EM.OUTBOUND

This file has been places in
[root@vsl000i031 /]# find . -name jndi.properties -print
./weblogic/Oracle/Middleware/user_projects/domains/base_domain/jndi.properties
./weblogic/Oracle/Middleware/wlserver_10.3/server/jndi.properties

If I write java code to establish the connection is successfully connects using the above jndi properties.

I have tried placing the above file into a jar and including it on the weblogic class path, but when I do that the server fails to start.

Hopefully someone can help me with my problem.

Thanks.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points