initializeServletDispatcher();
Authenticator.initNonceManager();
org.jvnet.glassfish.comms.security.auth.impl.PAssertedAuthenticatorFactory.getInstance();
SipSecurityManager manager = SipSecurityManager.createManager((SipBundleDescriptor)super.getDescriptor(),true);
String pContextId = manager.getContextID();
if (!manager.inService()) {
new DescriptorProcessor().process(pContextId, convergedContext.getSipApplication());
}
convergedContext.getDispatcher().setContextId(pContextId);
SipApplication application = convergedContext.getSipApplication();
Map<String, org.jvnet.glassfish.comms.deployment.backend.Servlet> map = application.getServlets();
Collection<org.jvnet.glassfish.comms.deployment.backend.Servlet> coll = map.values();
Iterator<org.jvnet.glassfish.comms.deployment.backend.Servlet> itr = coll.iterator();
HashMap<String, String> runAsMap = new HashMap<String, String>();
while (itr.hasNext()) {
org.jvnet.glassfish.comms.deployment.backend.Servlet servlet = itr.next();
String rolename = servlet.getRunAsRoleName();
String servletName = servlet.getServletName();
runAsMap.put(servletName, rolename);
}
if (runAsMap.size() > 0) {
convergedContext.getDispatcher().getAuthModule().setRunAs(manager.readRunAs(super.getDescriptor(), runAsMap));
}
} catch (Exception e) {
e.printStackTrace();
ok = false;
}