use of com.adaptris.core.services.StatelessServiceWrapper in project interlok by adaptris.
the class AdapterComponentCheckerTest method createConnectedServices.
private String createConnectedServices(String sharedName) throws Exception {
ServiceList nestedList = new ServiceList();
nestedList.add(new StandaloneProducer(new MockAllowsRetriesConnection(6), new NullMessageProducer()));
if (!StringUtils.isEmpty(sharedName)) {
nestedList.add(new StatelessServiceWrapper(new StandaloneProducer(new SharedConnection(sharedName), new NullMessageProducer())));
} else {
nestedList.add(new StatelessServiceWrapper(new StandaloneProducer()));
}
nestedList.add(new AddMetadataService(new ArrayList(Arrays.asList(new MetadataElement[] { new MetadataElement("key", "value") }))));
ServiceList list = new ServiceList();
list.add(nestedList);
list.add(new JdbcServiceList());
return DefaultMarshaller.getDefaultMarshaller().marshal(list);
}
use of com.adaptris.core.services.StatelessServiceWrapper in project interlok by adaptris.
the class ServiceUtilTest method testRewriteForTesting_NoConnection.
@Test
public void testRewriteForTesting_NoConnection() throws Exception {
NullService nullService = new NullService();
JdbcServiceList jdbcService = new JdbcServiceList();
StatelessServiceWrapper stateless = new StatelessServiceWrapper(new StandaloneProducer());
assertTrue(nullService == rewriteConnectionsForTesting(nullService));
assertTrue(jdbcService == rewriteConnectionsForTesting(jdbcService));
assertTrue(stateless == rewriteConnectionsForTesting(stateless));
ServiceList nestedList = new ServiceList();
ServiceList list = new ServiceList();
list.add(nestedList);
assertTrue(list == rewriteConnectionsForTesting(list));
}
use of com.adaptris.core.services.StatelessServiceWrapper in project interlok by adaptris.
the class ServiceUtilTest method createConnectedServices.
private String createConnectedServices() throws Exception {
ServiceList nestedList = new ServiceList();
nestedList.add(new StandaloneProducer(new MockAllowsRetriesConnection(6), new NullMessageProducer()));
nestedList.add(new StatelessServiceWrapper(new StandaloneProducer()));
nestedList.add(new AddMetadataService(new ArrayList(Arrays.asList(new MetadataElement[] { new MetadataElement("key", "value") }))));
ServiceList list = new ServiceList();
list.add(nestedList);
list.add(new JdbcServiceList());
return DefaultMarshaller.getDefaultMarshaller().marshal(list);
}
Aggregations