try {
// Create the naming service
org.jacorb.naming.NamingContextImpl.init(orb, rootPOA);
NamingContextImpl ns = new NamingContextImpl(namingPOA);
Configuration config = ((org.jacorb.orb.ORB) orb).getConfiguration();
ns.configure(config); // configure the name service using the JacORB config
byte[] rootContextId = "root".getBytes();
namingPOA.activate_object_with_id(rootContextId, ns);
namingService = NamingContextExtHelper.narrow(namingPOA.create_reference_with_id(rootContextId,
"IDL:omg.org/CosNaming/NamingContextExt:1.0"));
} catch (Exception e) {