this.endpoints = new EndpointsImpl();
File regStore = new File(getWorkingDir(), "/registry.xml");
if (regStore.isFile()) {
try {
//todo support other store types
context.setRegistry(new XmlRegistryStore(context).load(regStore.getAbsolutePath()));
} catch (Exception e) {
LOGGER.warn("Invalid registry found. Creating a new one");
}
} else {
LOGGER.info("No registry found. Creating a new one");
}
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) {