-
1. Re: CachePolicy in JaasSecurityManagerService
starksm64 Oct 10, 2007 3:19 PM (in response to anil.saldhana)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");
-
2. Re: CachePolicy in JaasSecurityManagerService
anil.saldhana Oct 10, 2007 3:34 PM (in response to anil.saldhana)I know about what you said. I am thinking whether there was any other reason why the objectfactory approach was chosen, like some customer wanting to do "java:/jaas/securitydomain/cache-policy" to get to the cache policy instance or such.
I think the simpler approach is just to inject the FQN of the cache policy implementation into the jaassecmgr mbean service. -
3. Re: CachePolicy in JaasSecurityManagerService
starksm64 Oct 10, 2007 3:55 PM (in response to anil.saldhana)Injection meant a shot at the doctor 5 years ago when this was created.
-
4. Re: CachePolicy in JaasSecurityManagerService
anil.saldhana Oct 10, 2007 3:58 PM (in response to anil.saldhana)Ok got it. Inheritance from Dan and team.
I will request Stefan (who brought this issue up originally) to do the FQN way to add clustered cache policy if an user requires.