}
if (getRegistry() == null) {
context.setRegistry(new XmlRegistryStore(context).create(regStore.getAbsolutePath(), new JbiRegistryFactory()));
}
if (this.router == null) {
this.router = new InternalMessageRouter(this, new DirectRouter(getRegistry()));
}
} catch (Exception e) {
if (e instanceof JBIException) {
throw (JBIException) e;
} else {