properties.put(Context.PROVIDER_URL, getProviderURI(url));
map(properties, Context.PROVIDER_URL, ORB.PROVIDER_URI);
map(properties, Context.SECURITY_PRINCIPAL, ORB.SECURITY_PRINCIPAL);
map(properties, Context.SECURITY_CREDENTIALS, ORB.SECURITY_CREDENTIALS);
ORB orb;
Registry registry;
try {
orb = SharedORB.getInstance();
registry = orb.getRegistry(properties);
} catch (RemoteException exception) {
NamingException error = new CommunicationException(
"Failed to get registry service for URL: " + url);
error.setRootCause(exception);
throw error;