1 Reply Latest reply on Mar 1, 2013 9:56 AM by René van Wijk

    Connection between weblogic and OpenMQ


      I have a little task. We have 2 servers: OpenMQ Server and Weblogic server and we have 4 queues: request and response queues at WLS and request/response queues at OpenMQ. I need to create connection between 2 request and 2 response queues (some application put message at WL request queue, my connection put this message at OMQ queue, some application processes this message and put response at OMQ response queue, my connection consume this message at WLS respons queue and so on).
      I don't know why, but WLS bridges doesn't work. And I decided to create 2 EJB applications (for request/request connection and response/response connection). I try many things, but this is doesn't work too! Anyone, please, give me some advice - how i must create EJB applications and, that the most important, how i must set up connection between WLS and OMQ Queues?

      Thank you!
        • 1. Re: Connection between weblogic and OpenMQ
          René van Wijk
          The problem you are running into with the message bridge is probably related to class loading and the weird JNDI context you need to configure for Open MQ.

          Also not the following:
          "Beginning with Open MQ 4.4u2, Oracle no longer offers Open MQ as an independent product. Open MQ will continue to provide builds and separate release packages as they are contributing to the GlassFish Server project."

          Here (http://middlewaremagic.com/weblogic/?p=7960) is an example that integrates Spring (sorry no EJB) with GlassFish JMS (or Open MQ). The following is needed to make a connection with the JNDI server on GlassFish
          public class JMSTest {
              public static void main(String[] args) {
                  Properties props = new Properties();
                  props.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory");
                  props.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming");
                  props.setProperty("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
                  props.setProperty("org.omg.CORBA.ORBInitialHost", "");
                  props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
                  try {
                      Context context = new InitialContext(props);
                  } catch (NamingException e) {
          in which jms/ConnectionFactory is the JNDI name of the connection factory configured on the GlassFish side. To be able to run this you need gf-client.jar on the classpath,
          which references a lot of jars within the GlassFish distribution (meaning you need to have GlassFish installed on the client). I tried to find a set of jars, but was unable
          to do so, so hence the crude solution. This would probably pose a problem on WebLogic as a lot of the classes will interfere with the WebLogic CLASSPATH, what you
          can try to do is put the gl-client.jar into the DOMAIN_HOME/lib directory (jars put here are will be picked up and put at the end of the CLASSPATH - see the readme.txt
          file within this directory for more information). Note that the example presented in the blog post was running in its own JVM and not in a WebLogic Server.