[jboss-user] [JBoss Cache] - Re: JBoss cache / concurrent creation event

alex soto do-not-reply at jboss.com
Wed Nov 24 12:58:51 EST 2010

alex soto [http://community.jboss.org/people/lexsoto%40gmail.com] created the discussion

"Re: JBoss cache / concurrent creation event"

To view the discussion, visit: http://community.jboss.org/message/572852#572852

I am experiencing the same issue.  I think this is caused by use of optimistic locking mode for the Hibernate 2nd level cache configuration.  Two threads try to add the same element to the cache at about the same time.  Once the second thread completes the transaction, the first one had already added the element to the cache and the transaction is aborted.  

I suppose it would not happen if the lock (JBoss cache) locking scheme is changed to pessimistic, but that will result in less throughput.  

My question really is about how and or when Hibernate uses the new JBoss cache method "putForExternalRead"  which should silently return if the node is already in the cache.  Anybody?

Reply to this message by going to Community

Start a new discussion in JBoss Cache at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20101124/9c609eba/attachment.html 

More information about the jboss-user mailing list