[jboss-user] [JBossCache] - Re: Transactions

manik.surtani@jboss.com do-not-reply at jboss.com
Wed Jul 11 08:14:30 EDT 2007


Using a distributed TM may work and is worth trying out, as I'd imagine this is the "correct" approach, provided C is configured with a TransactionManagerLookup that knows how to get a handle on the distributed TM.

A simpler approach may be not to use a custom API to communicate between A and C at all, but instead do do something like this:

Let B be another cache instance, which runs in the same JVM as A.  A always talks to B, never directly to C.  So this way transactional scope is maintained regardless of which TM you use.

Now B can be tuned with an aggressive eviction policy so it does not maintain much state at all in memory so it doesn't impact the machine very much.  B is also configured with a TcpCacheLoader pointing at C.  C runs with a TcpCacheServer, which acts as a backing cache to B.  So all the cache state is really held in C, but B acts as the API front end for interacting with the cache.

  



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

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



More information about the jboss-user mailing list