[jboss-dev-forums] [Design of JBossCache] - Re: Optimising contents of a prepare call - JBCACHE-611

manik.surtani@jboss.com do-not-reply at jboss.com
Mon Nov 12 12:41:44 EST 2007


Bringing this back up, since this is scheduled for inclusion in 2.2.0.

As a basic design, I think we should look at a consistent "replay" approach for both pessimistic and optimistic locking (rather than shipping the workspace deltas across for optimistic locking), so we can stick with a single TxInterceptor.  Shipping the workspace across will require different TxInterceptor behaviour when receiving a prepare.

The actual approach could be quite simple - the TransactionEntry currently maintains a List of MethodCalls.  This list is populated by TransactionEntry.addModification(MethodCall m).

This method could be modified to perform any compacting on the modification list at this time (if compacting is enabled).

Also, as a default, I think compacting *should* be enabled since most transactional calls would involve > 1 method invocation, and even if they didn't the compacting algorithm can only start compacting if there are, say, > 3 modifications at the time.



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

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



More information about the jboss-dev-forums mailing list