activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Davies <>
Subject Re: Double checked locking.
Date Tue, 27 Feb 2007 23:30:27 GMT
Hi Tom,

good catch - its not intentional double check locking - the method  
should be synchronized (even though its a static) - its only called  
for an un initialized store - so the overhead isn't a problem.



On 27 Feb 2007, at 22:45, Tom Kaitchuck wrote:

> I was running a code analyzer and it flagged
> org.apache.activemq.kaha.impl.getVmLockSet() as doing unsafe locking.
> I'm looking at the code and it's not clear to me what it needs to
> protect against. It looks to me like this code is trying to do double
> checked locking, which in general is not safe in java. Could someone
> with a solid understanding of this code take a look at it?

View raw message