This discussion is archived
8 Replies Latest reply: May 16, 2012 2:51 AM by 936402 RSS

Creating a Messaging Bridge (WebLogic to ActiveMQ)

916271 Newbie
Currently Being Moderated
I'm trying configure a JMS bridge between a weblogic queue (source) and a activeMQ queue (target) through the console. My bridge doesn't work!
I don't know what I have to do in the field "CLASSPATH". I've already set the path to the jars of the activemq like "C:\apache-activemq-5.4.3\lib ..." but nothing happened.
I created a bridge between two queues in the JMS WebLogic and it worked, then I know that the problem is with this field.

How can I set correctly the Classpath?

Thanks!
  • 1. Re: Creating a Messaging Bridge (WebLogic to ActiveMQ)
    653697 Journeyer
    Currently Being Moderated
    The correct way to configure a bridge to work with foreign JMS providers is to put the foreign JMS provider client jar file in the WebLogic server's CLASSPATH.

    Here is what the public doc says.
    Interoperating with Foreign Providers

    When configuring a messaging bridge involves interoperability with a third-party messaging provider, you must configure the following:

    Before starting WebLogic Server:

    Supply the provider's CLASSPATH in the WebLogic Server CLASSPATH.

    Include the PATH of any native code required by the provider's client-side libraries in the WebLogic Server system PATH. (This variable may vary depending on your operating system.)

    In the JMSBridgeDestination instance for the third-party messaging product being bridged, provide vendor-specific information in the following attributes:

    Connection URL

    Initial Context Factory

    Connection Factory JNDI Name

    Destination JNDI Name

    For more details about bridge configuration, please refer to
    http://docs.oracle.com/cd/E17904_01/web.1111/e13741/wls_interop.htm#i1121383

    Hope this helps.
  • 2. Re: Creating a Messaging Bridge (WebLogic to ActiveMQ)
    916271 Newbie
    Currently Being Moderated
    Hello Dongbo,

    This is the problem! I don't know how can I supply the provider's CLASSPATH in the WebLogic Server CLASSPATH. It's through the console?

    Connection URL: tcp://localhost:61616
    Initial Context Factory: weblogic.jndi.WLInitialContextFactory
    Connection Factory JNDI Name: QueueConnectionFactory
    Destination JNDI Name: msgAct

    Thanks!
  • 3. Re: Creating a Messaging Bridge (WebLogic to ActiveMQ)
    653697 Journeyer
    Currently Being Moderated
    There are two ways to do that:
    1. put the jar file or the path of the ActiveMQ client classes in the CLASSPATH environment variable on the window where you start the WebLogic server instance.
    2. add the jar file or the path of theActiveMQ client classes in the java command line that you use to start the WebLogic server (-classpath XXXXX).

    Dongbo
  • 4. Re: Creating a Messaging Bridge (WebLogic to ActiveMQ)
    timdaly - oracle Explorer
    Currently Being Moderated
    Fe.maq,

    Here is a step by step guide to setting up a messaging bridge with a foreign JMS provider. This has been written using Tibco, but if you replace the Tibco components with ActiveMQ ones, the process is the same.

    http://tim.blackamber.org.uk/?p=614

    Edited by: EramusBlack on May 10, 2012 10:06 AM
  • 5. Re: Creating a Messaging Bridge (WebLogic to ActiveMQ)
    653697 Journeyer
    Currently Being Moderated
    Initial Context Factory: weblogic.jndi.WLInitialContextFactory
    I have just noticed that you are using WebLogic initial context factory for ActiveMQ. You'll need to change it to the class name of the ActiveMQ initial context factory.
  • 6. Re: Creating a Messaging Bridge (WebLogic to ActiveMQ)
    916271 Newbie
    Currently Being Moderated
    I've changed it, thanks Dongbo!
  • 7. Re: Creating a Messaging Bridge (WebLogic to ActiveMQ)
    916271 Newbie
    Currently Being Moderated
    Hello,

    I put the path of the ActiveMQ in the WebLogic's classpath but nothing happened! When I started the server, it appeared in the Log view:

    WLS Start Mode=Development
    .
    CLASSPATH=C:\Oracle\MIDDLE~1\ORACLE~1\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar;*C:\apache-activemq-5.4.3\activemq-all-5.4.3.jar*; ...

    But the messages doesn't arrive in the ActiveMQ queue!

    Thanks!

    Edited by: fe.mag on 11/05/2012 11:32
  • 8. Re: Creating a Messaging Bridge (WebLogic to ActiveMQ)
    936402 Newbie
    Currently Being Moderated
    You should add the C:\apache-activemq-5.4.3\activemq-all-5.4.3.jar to commEnv.cmd

    set WEBLOGIC_CLASSPATH=%JAVA_HOME%\lib\tools.jar;%WL_HOME%\server\lib\weblogic_sp.jar;%WL_HOME%\server\lib\weblogic.jar;%FEATURES_DIR%\weblogic.server.modules_12.1.1.0.jar;%WL_HOME%\server\lib\webservices.jar;%ANT_HOME%/lib/ant-all.jar;%ANT_CONTRIB%/lib/ant-contrib.jar;%WL_HOME%/server/lib/activemq-all-5.5.1.jar;%WL_HOME%/server/lib/slf4j-api-1.5.11.jar;

Legend

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