use of com.adaptris.core.jms.PtpProducer in project interlok by adaptris.
the class DefaultEventHandlerTest method retrieveObjectForSampleConfig.
/**
* @see com.adaptris.core.ExampleConfigCase#retrieveObjectForSampleConfig()
*/
@Override
protected Object retrieveObjectForSampleConfig() {
Adapter result = null;
try {
AdaptrisMessageProducer p = new PtpProducer().withQueue("publishEventsTo");
DefaultEventHandler eh = new DefaultEventHandler();
eh.setConnection(new JmsConnection(new StandardJndiImplementation("MyConnectionFactoryName")));
eh.setProducer(p);
eh.setMarshaller(DefaultMarshaller.getDefaultMarshaller());
result = new Adapter();
result.setChannelList(new ChannelList());
result.setEventHandler(eh);
result.setUniqueId(UUID.randomUUID().toString());
} catch (Exception e) {
throw new RuntimeException(e);
}
return result;
}
use of com.adaptris.core.jms.PtpProducer in project interlok by adaptris.
the class RetryingServiceWrapperTest method retrieveObjectForSampleConfig.
@Override
protected Object retrieveObjectForSampleConfig() {
JmsConnection connection = new JmsConnection();
connection.setVendorImplementation(new StandardJndiImplementation("MyConnectionFactory"));
StandaloneProducer wrappedService = new StandaloneProducer();
wrappedService.setConnection(connection);
wrappedService.setProducer(new PtpProducer().withQueue(("MyQueueName")));
RetryingServiceWrapper service = new RetryingServiceWrapper();
service.setUniqueId("Retrying Service Wrapper");
service.setNumRetries(10);
service.setRestartOnFailure(true);
service.setDelayBetweenRetries(new TimeInterval(10L, TimeUnit.SECONDS));
service.setService(wrappedService);
return service;
}
Aggregations