4 Replies Latest reply on Mar 12, 2013 1:38 AM by hasan serdar

    Cache Store really supports transactional updates ?

    hasan serdar Newbie

      I am confused on cache store transaction issue. In documentation

       

      https://docs.jboss.org/author/display/ISPN/Cache+Loaders+and+Stores#CacheLoadersandStores-CacheLoadersandtransactionalcaches

       

      it says:

       

       

       

      When a cache is transactional and a cache loader is present, the cache loader won't be enlisted in the transaction in which the cache is part. That means that it is possible to have inconsistencies at cache loader level: the transaction to succeed applying the in-memory state but (partially) fail applying the changes to the store. Manual recovery would not work with caches stores.

       

      At the same document

       

      https://docs.jboss.org/author/display/ISPN/Cache+Loaders+and+Stores#CacheLoadersandStores-Filesystembasedcacheloaders

       

      it says:

       

      Note that the BerkeleyDB implementation is much more efficient than the filesystem-based implementation, and provides transactional guarantees, but requires a commercial license if distributed with an application (seehttp://www.oracle.com/database/berkeley-db/index.html for details).

       

      In conclusion is there a cache store supports transactional cahce ? For example in a transaction like:

       

      tx.begin()

      account1.addMoney(100);

      account2.takeMoney(100);

      cache.put(account1.getId(),account1);

      cache.put(account2.getId(),account2);

      tx.commit();

       

      is there a cache store configuration that guaranties that account1 and account2 is updated by a transaction ( two-phase commit ) in the cache store ?