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
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)