A given instance of JaasSecurityManager never has its domainCache reset. Its set only on creation of JaasSecurityManager by the JaasSecurityManagerService when a lookup does not have an existing binding. This cannot be seen from the given JaasSecurityManager code fragment though.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Scott Marlow Sent: Thursday, April 20, 2006 6:36 PM To: jboss-development@lists.sourceforge.net Subject: Re: [JBoss-dev] synchronization on non-final fields warning The problem in the JaasSecurityManager class example below is that the domainCache variable itself needs to be protected with synchronization since its non-final (for all domainCache read/write operations.) It is not fine as one thread could be performing updateCache(Principal), meanwhile, another thread assigns a new value to domainCache. The thread performing updateCache, wouldn't have a consistent memory view of the new domainCache and also violates atomicity. ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development