assertNull(obj[0]);
}
public Service initialiseService(byte txBeginAction, EventCallback callback) throws Exception
{
Service service = new SedaService(muleContext);
((AbstractService) service).setExceptionListener(new DefaultMessagingExceptionStrategy(muleContext, true));
service.setName("testComponent");
service.setComponent(new DefaultJavaComponent(new PrototypeObjectFactory(JdbcFunctionalTestComponent.class)));
TransactionFactory tf = getTransactionFactory();
TransactionConfig txConfig = new MuleTransactionConfig();
txConfig.setFactory(tf);
txConfig.setAction(txBeginAction);
EndpointBuilder endpointBuilder = new EndpointURIEndpointBuilder(getInDest(), muleContext);
endpointBuilder.setName("testIn");
endpointBuilder.setConnector(connector);
endpointBuilder.setTransactionConfig(txConfig);
InboundEndpoint endpoint = muleContext.getEndpointFactory().getInboundEndpoint(
endpointBuilder);
EndpointBuilder endpointBuilder2 = new EndpointURIEndpointBuilder(getOutDest(), muleContext);
endpointBuilder2.setName("testOut");
endpointBuilder2.setConnector(connector);
OutboundEndpoint outProvider = muleContext.getEndpointFactory().getOutboundEndpoint(
endpointBuilder2);
service.setOutboundMessageProcessor(new DefaultOutboundRouterCollection());
OutboundPassThroughRouter router = new OutboundPassThroughRouter();
router.addRoute(outProvider);
((OutboundRouterCollection) service.getOutboundMessageProcessor()).addRoute(router);
((CompositeMessageSource) service.getMessageSource()).addSource(endpoint);
// these tests no longer work - they need replacing with config driven tests
// furthemore, nothing is read from service properties any more
// (except for axis and cxf related hacks)
// so i am removing the code below since it's a pointless call to a deprecated method
// HashMap props = new HashMap();
// props.put("eventCallback", callback);
// service.setProperties(props);
service.setModel(model);
muleContext.getRegistry().registerService(service);
return service;
}