TransactionFactory tf = getTransactionFactory();
TransactionConfig txConfig = new MuleTransactionConfig(txBeginAction);
txConfig.setFactory(tf);
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();