[jboss-user] [JBoss Cache: Core Edition] - tx aware cache config issue

emmartins do-not-reply at jboss.com
Tue Jan 20 19:21:50 EST 2009


Hi, we are finally migrating Mobicents JAIN SLEE server (from XACache) to JBoss Cache 3 and I'm having an issue, consider this code:


  |                         Fqn fqn = Fqn.fromElements("short test");
  | 			try {
  | 				begin();
  | 				setRollbackOnly();
  | 				cache.getRoot().addChild(fqn);
  | 				commit();
  | 				begin();
  | 				if (cache.getRoot().hasChild(fqn)) {
  | 					logger.info("BIGGGGGGGGGGGGGGG ISSSSSSSSSSSSSSSSSSSSUEEEEEEEEEE");
  | 				}
  | 				commit();
  | 			}
  | 			catch (Exception e) {
  | 				logger.error(e.getMessage(),e);
  | 			}
  | 

The method names have the meaning of the same named jta tx manager operations.

The issue is that if setRollbackOnly() then jboss cache adds the node to cache, how can I avoid this and make jboss cache only tx aware and don't commit changes when no tx is in active or preparing state?

Thanks in advance.

-- Eduardo

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

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



More information about the jboss-user mailing list