if (user != null) {
properties = new HashMap(_properties);
properties.put(ORB.SECURITY_PRINCIPAL, user);
properties.put(ORB.SECURITY_CREDENTIALS, password);
}
Registry registry = null;
try {
if (_orb == null) {
_orb = SharedORB.getInstance();
}
registry = _orb.getRegistry(properties);
} catch (AccessException exception) {
JMSSecurityException error = new JMSSecurityException(
exception.getMessage());
error.setLinkedException(exception);
throw error;
} catch (RemoteException exception) {
JMSException error = new JMSException(
"Failed to get registry service for URL: " + _serverURI);
error.setLinkedException(exception);
throw error;
}
try {
factory = (ServerConnectionFactory) registry.lookup("server");
} catch (NotBoundException exception) {
throw new JMSException(
"Server is not bound in the registry for URL: "
+ _serverURI);
} catch (RemoteException exception) {