@Override
public void start(StartContext context) throws StartException {
JacORBLogger.ROOT_LOGGER.debugServiceStartup(context.getController().getName().getCanonicalName());
ORB orb = orbInjector.getValue();
POA rootPOA = rootPOAInjector.getValue();
POA namingPOA = namingPOAInjector.getValue();
try {
// initialize the static naming service variables.
CorbaNamingContext.init(orb, rootPOA);
// create and initialize the root context instance according to the configuration.
CorbaNamingContext ns = new CorbaNamingContext();
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);
namingService = NamingContextExtHelper.narrow(namingPOA.create_reference_with_id(rootContextId,
"IDL:omg.org/CosNaming/NamingContextExt:1.0"));
} catch (Exception e) {
throw JacORBLogger.ROOT_LOGGER.failedToStartJBossCOSNaming(e);
}