if (defaultSecurityContext) {
securityContext = SecurityContext.getDefaultSecurityContext();
}
else {
AppServSecurityContext appServSecurityContext = ConcurrentRuntime.getRuntime().getSecurityContext();
securityContext = appServSecurityContext.newInstance(principalName, subject, null);
}
}
//TODO re-initialize these fields
contextClassLoader = null;
}