registerInboundRouter(container, ctx);
}
protected void registerInboundRouter(JbiContainer container, ComponentContext ctx) throws JBIException, IOException {
if(inboundMessageRouter==null) return;
InboundRouterComponent routerComponent = new InboundRouterComponent();
routerComponent.setRouter(inboundMessageRouter);
QName routerService = new QName(name + ":InboundRouter");
routerComponent.setTargetService(routerService);
try {
container.getRegistry().addTransientComponent(routerService.getLocalPart(),
ComponentType.JBI_ENGINE_COMPONENT, routerComponent, null);
} catch (RegistryException e) {
throw new JBIException(e);
}
routerComponent.getContext().activateEndpoint(routerService, routerService.getLocalPart());
}