// initialize the static naming service variables.
JBossNamingContext.init(orb, rootPOA);
// create and initialize the root context instance according to the configuration.
JBossNamingContext ns = new JBossNamingContext();
Configuration configuration = ((org.jacorb.orb.ORB) orb).getConfiguration();
boolean doPurge = configuration.getAttribute("jacorb.naming.purge", "off").equals("on");
boolean noPing = configuration.getAttribute("jacorb.naming.noping", "off").equals("on");
ns.init(namingPOA, doPurge, noPing);
// create and activate the root context.
byte[] rootContextId = "root".getBytes();
namingPOA.activate_object_with_id(rootContextId, ns);