if (this.serverAuthenticationManagerClass == null) {
SecurityContext context = SecurityActions.getSecurityContext();
if (context != null) {
WebLogger.WEB_SECURITY_LOGGER.debugf("Instantiating JASPI authentication manager with security domain %s",
context.getSecurityDomain());
sam = new JASPIServerAuthenticationManager(context.getSecurityDomain(), new JBossCallbackHandler());
}
else {
WebLogger.WEB_SECURITY_LOGGER.debugf("Security context is null, instantiating JASPI authentication manager with default domain");
sam = new JASPIServerAuthenticationManager();
}