[jboss-dev-forums] [Design of Security on JBoss] - Re: CachePolicy in JaasSecurityManagerService

scott.stark@jboss.org do-not-reply at jboss.com
Wed Oct 10 15:19:41 EDT 2007


Its just a factory that happens to use a jndi lookup as an implicit factory api based on the javax.naming.spi.ObjectFactory. In reality, its equivalent to:


  | public interface AuthenticationManagerFactory
  | {
  |    public AuthenticationManager newInstance(String domainName);
  | }
  | // Getting hold of this is the problem the jndi lookup solves
  | AuthenticationManagerFactory factory = ...; 
  | AuthenticationManager am = factory.newInstance("jaas-domain");
  | 

Instead, use of a naming convention for the security domain (java:/jaas prefix) implicitly locates the AuthenticationManager factory:

  | InitialContextFactory factory = new InitialContextFactory();
  | AuthenticationManager am = (AuthenticationManager) factory.lookup("java:/jaas/jaas-domain");
  | 


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093686#4093686

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093686



More information about the jboss-dev-forums mailing list