WSO2 ESB and OpenMQ in GlassFish

jsgoldberger's picture
I am trying to configure WSO2ESB to proxy JMS messages from a queue in OpenMQ running embedded in GlassFish v3. I am able to receive these messages using a simple standalone java client shown below. I cannot figure out how to translate this to the parameters required in axis2.xml to allow the jms listener to perform the JNDI lookups to get the connection factory and destination. You provide samples of the config for ActiveMQ, but not for other JMS providers. Thanks in advance for any advice and help, Joel public class App implements MessageListener { public static void main(String[] args) { new App().go(); } public void go() { try { Context context = new InitialContext(); QueueConnectionFactory qfactory = (QueueConnectionFactory) context.lookup("jms/MyConnectionFactory"); QueueConnection qconnection = qfactory.createQueueConnection(); QueueSession qsession = qconnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); Destination myDest = (Destination) context.lookup("jms/MyQueue"); MessageConsumer consumer = qsession.createConsumer(myDest); consumer.setMessageListener(this); qconnection.start(); } catch (Exception ex) { ex.printStackTrace(); } } public void onMessage(Message message) { TextMessage msg = (TextMessage) message; try { String msgText = msg.getText(); System.out.println("Received: " + msgText); } catch (Exception ex) { ex.printStackTrace(); } } }
rajika's picture

hi, If you provide the

hi,
If you provide the required parameters in axis2.xml for JMS transport receiver this can be possible. Refer the parameter names of ActiveMQ for example. And also if you are using version 2.x.x copy the client JMS jars of Open ESB to $ESB_HOME/repository/component/libs

Rajika

Hot Topic
Hot
Topic

With the release of the 3.5 version of the Registry, it features a WS API that allows users to conduct registry operations through simple SOAP requests. The opening up of this channel makes the Registry useful in a number of possible ways. Also, it introduces some best...

Latest Webinar
Sumedha Rubasinghe, an Architect and Product Manager of WSO2 will explain you how to create your own web applications using WSO2 Cloud platform, WSO2 Stratos.
Wednesday, August 4, 10.00 AM (PDT)

Wednesday, August 4, 9.00 AM (GMT)