muleContext.getEndpointFactory().getInboundEndpoint("vm://*"));
}
else
{
// Set multiple inbound subscriptions on the descriptor
ServiceCompositeMessageSource messageRouter = (ServiceCompositeMessageSource) service.getMessageSource();
for (int i = 0; i < subscriptions.length; i++)
{
String subscription = subscriptions[i];
EndpointFactory endpointFactory = muleContext.getEndpointFactory();
EndpointBuilder endpointBuilder = endpointFactory.getEndpointBuilder(subscription);
endpointBuilder.setExchangePattern(MessageExchangePattern.fromSyncFlag(!asynchronous));
InboundEndpoint endpoint = endpointFactory.getInboundEndpoint(endpointBuilder);
messageRouter.addSource(endpoint);
}
}
DefaultJavaComponent component = new DefaultJavaComponent(new SingletonObjectFactory(this));
component.setMuleContext(muleContext);
service.setComponent(component);