_orb = ORBFactory.createORB(_authenticator, properties);
if (!_connectURI.equals(_exportURI)) {
_orb.addRoute(_exportURI, _connectURI);
}
} catch (RemoteException exception) {
throw new ServerException(
"Failed to create ORB for URI:" + _exportURI, exception);
}
try {
LocalRegistry registry = _orb.getRegistry();
RemoteServerConnectionFactory server =
new RemoteServerConnectionFactory(_factory, _orb,
_exportURI);
registry.bind("server", server.getProxy());
if (_log.isInfoEnabled()) {
_log.info("Server accepting connections on " + _exportURI);
}
if (_config.getServerConfiguration().getEmbeddedJNDI()) {
NamingProvider provider = _names.getNamingProvider();
RemoteNamingProvider jndi = new RemoteNamingProvider(provider,
_orb,
_connector.getJNDIExportURI());
registry.bind("jndi", jndi.getProxy());
if (_log.isInfoEnabled()) {
_log.info("JNDI service accepting connections on "
+ _connector.getJNDIExportURI());
}
}
JmsAdminServerImpl admin = new JmsAdminServerImpl(_manager,
_orb,
_connector.getAdminExportURI());
registry.bind("admin", admin.getProxy());
if (_log.isInfoEnabled()) {
_log.info("Admin service accepting connections on "
+ _connector.getAdminExportURI());
}
registry.setReadOnly(true);
} catch (Exception exception) {
throw new ServerException(
"Failed to initialise the server interface", exception);
}
}