use of org.apache.oozie.service.JMSAccessorService in project oozie by apache.
the class TestJMSSLAEventListener method getConnectionContext.
private ConnectionContext getConnectionContext() {
Configuration conf = services.getConf();
String jmsProps = conf.get(JMSJobEventListener.JMS_CONNECTION_PROPERTIES);
JMSConnectionInfo connInfo = new JMSConnectionInfo(jmsProps);
JMSAccessorService jmsService = Services.get().get(JMSAccessorService.class);
ConnectionContext jmsContext = jmsService.createConnectionContext(connInfo);
return jmsContext;
}
use of org.apache.oozie.service.JMSAccessorService in project oozie by apache.
the class JMSExceptionListener method onException.
@Override
public void onException(JMSException exception) {
LOG.warn("Received JMSException for [{0}]", connInfo, exception);
connCtxt.close();
if (retry) {
JMSAccessorService jmsService = Services.get().get(JMSAccessorService.class);
jmsService.reestablishConnection(connInfo);
}
}
use of org.apache.oozie.service.JMSAccessorService in project oozie by apache.
the class TestJMSJobEventListener method getConnectionContext.
private ConnectionContext getConnectionContext() {
Configuration conf = services.getConf();
String jmsProps = conf.get(JMSJobEventListener.JMS_CONNECTION_PROPERTIES);
JMSConnectionInfo connInfo = new JMSConnectionInfo(jmsProps);
JMSAccessorService jmsService = Services.get().get(JMSAccessorService.class);
ConnectionContext jmsContext = jmsService.createProducerConnectionContext(connInfo);
return jmsContext;
}
Aggregations