Methods Summary |
---|
private javax.naming.InitialContext | getInitialContext()
if (initialContextProperties != null) return new InitialContext(initialContextProperties);
else return new InitialContext();
|
private static org.jboss.security.plugins.JaasSecurityManager | getSecurityManager(java.lang.String name)
JaasSecurityManager manager = cache.get(name);
if (manager != null)
{
//log.info("cache hit");
return manager;
}
synchronized (cache)
{
if (manager != null)
return manager;
manager = new JaasSecurityManager(name, new SecurityAssociationHandler());
cache.put(name, manager);
}
return manager;
|
public void | setInitialContextProperties(java.util.Hashtable initialContextProperties)
this.initialContextProperties = initialContextProperties;
|
public void | start()
XMLLoginConfigImpl configuration = new XMLLoginConfigImpl();
configuration.setConfigResource("login-config.xml");
configuration.loadConfig();
Configuration.setConfiguration(configuration);
Context ctx = getInitialContext();
String factoryName = SecurityDomainObjectFactory.class.getName();
Reference ref = new Reference("nl.wolfc.embedded.security.plugins.JaasSecurityManager", factoryName, null);
ctx.rebind(SECURITY_MGR_PATH, ref);
|