[jboss-user] [JBossCache] - Re: TreeCache data integrity across cluster

manik.surtani@jboss.com do-not-reply at jboss.com
Fri Jul 21 00:48:49 EDT 2006


No, we don't have an explicit mechanism of obtaining a cluster-wide lock.  

A local lock is obtained on method invocation and is maintained till your transaction ends (commits or rolls back).

Locks on remote instances are obtained and released during the 2-phase commit.  (The prepare call attempts to acquire locks and updates data; the commit phase releases locks)

If the prepare phase cannot acquire the remote locks it needs within the given time (specified by the LockAcquisitionTimeout attribute) you see TimeoutExceptions.

You could also see TimeoutExceptions when trying to acquire the local lock if you have a lot of concurrent threads accessing the data.

You may want to try OPTIMISTIC locking, which greatly improves concurrency - at the cost of the occasional transaction failure due to validation clashes when updating concurrently accessed data.

Cheers,
Manik

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959765#3959765

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959765



More information about the jboss-user mailing list