[JBoss-user] [Security JAAS/JBoss] - Re: JaasSecurityManager try to insert duplicate entry into T

2006-05-03 Thread sean171
It's not clear how the fix can actually solve the problem even if two JaasSecurityManager can be created for the same SecurityDomain, each with its own TimedCahePolicy object In order for this exception to occur, there must be some code calling TimedCachePolicy.insert() inbetween outside a

[JBoss-user] [Security JAAS/JBoss] - Re: JaasSecurityManager try to insert duplicate entry into T

2006-04-21 Thread [EMAIL PROTECTED]
I did find a race condition that needs to be synchronized in the JaasSecurityManagerService which could result in this error. Really nothing to do with where the data sources reside other than how this affects the timing issues that cause the race condition.

[JBoss-user] [Security JAAS/JBoss] - Re: JaasSecurityManager try to insert duplicate entry into T

2006-04-20 Thread wwwluo
Scott, Given that TimedCachePolicy is created thread-safe, the code try to insert into it are wrapped in synchronized block and it is always try to remove existing entry with same principal before insertion, but we still got IllegalStateException for Attempt to insert duplicate entry, there

[JBoss-user] [Security JAAS/JBoss] - Re: JaasSecurityManager try to insert duplicate entry into T

2006-04-12 Thread wwwluo
Scott, Thanks for your help. We are not using a custom cache or accessing the cache via JNDI. It's worth noting that the hsm policy, which is used by the application to authenticate Browser users, uses a custom principal and sets its principal via

[JBoss-user] [Security JAAS/JBoss] - Re: JaasSecurityManager try to insert duplicate entry into T

2006-04-12 Thread [EMAIL PROTECTED]
security\src\main\org\jboss\security\plugins\JaasSecurityManagerService.java has the creation: | /** This is the InvocationHandler callback for the Context interface that |was created by out getObjectInstance() method. All this does is create |a new TimedCache

[JBoss-user] [Security JAAS/JBoss] - Re: JaasSecurityManager try to insert duplicate entry into T

2006-04-11 Thread wwwluo
One thing I forget to mention in the original post: we use a different policy for our main application HSM, and multiple similar policy for other data sources. We have multiple data sources in our application, all using the same encrypted username/password. 1. Could this has anything to do

[JBoss-user] [Security JAAS/JBoss] - Re: JaasSecurityManager try to insert duplicate entry into T

2006-04-11 Thread [EMAIL PROTECTED]
1. No. 2. The TimedCache is created with thread-safe set to true, and the update is done within a synchronized block holding the cache monitor. If the principal is seen to already be in the cache the existing value is removed so its not clear how a race condition can exist. Are you using a