[jboss-user] [JBossCache] - Re: override DefaultDataVersion

manik.surtani@jboss.com do-not-reply at jboss.com
Tue Apr 3 08:13:26 EDT 2007


Apologies for the code being hard to follow.  :-)  Optimistic locking is a pretty heavily patched and "organically grown" feature.  In 2.0.0 this has been sufficiently cleaned up (JBCACHE-942)

Regarding overriding the data version type, this feature is for very specific use cases and should only be used if you really know what you are doing with the versioning.  For example, one good use case is where an external entity maintains versioning info (such as a database).  Using timestamps on a file system is valid provided:

1)  Your unit of measurement is sufficiently fine-grained that you won't have colliding version numbers
2)  If this is replicated, your cluster nodes have reliable enough a clock synchronisation mechanism.

Do actually use your own data version, use the Option API to set a data version for each call (e.g., using overloaded methods on TreeCache that take in an Option object).

Note that the mechanism for doing this in 2.0.0 is different - see the 2.0.0 user guide for details on doing this in 2.0.0.


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

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



More information about the jboss-user mailing list