logger.log(Level.INFO,"Axis2 JMS URL=" + endpointURL);
jmsListener = new JMSListener();
jmsSender = new JMSSender();
ListenerManager listenerManager = configContext.getListenerManager();
TransportInDescription trsIn = configContext.getAxisConfiguration().getTransportIn(Constants.TRANSPORT_JMS);
// get JMS transport parameters from the computed URL
Map<String, String> jmsProps = JMSUtils.getProperties(endpointURL);
// collect the parameters used to configure the JMS transport
OMFactory fac = OMAbstractFactory.getOMFactory();
OMElement parms = fac.createOMElement(DEFAULT_QUEUE_CONNECTION_FACTORY, null);
for ( String key : jmsProps.keySet() ) {
OMElement param = fac.createOMElement("parameter", null);
param.addAttribute( "name", key, null );
param.addChild(fac.createOMText(param, jmsProps.get(key)));
parms.addChild(param);
}
Parameter queueConnectionFactory = new Parameter(DEFAULT_QUEUE_CONNECTION_FACTORY, parms);
trsIn.addParameter( queueConnectionFactory );
trsIn.setReceiver(jmsListener);
configContext.getAxisConfiguration().addTransportIn( trsIn );
TransportOutDescription trsOut = configContext.getAxisConfiguration().getTransportOut(Constants.TRANSPORT_JMS);
//configContext.getAxisConfiguration().addTransportOut( trsOut );
trsOut.setSender(jmsSender);