Quantcast
Channel: VMware Communities : All Content - vFabric GemFire [ARCHIVED]
Viewing all articles
Browse latest Browse all 990

Question about CacheTransactionManager

$
0
0

I have a dude with the CacheTransactionManager

 

I have this code:

 

CacheTransactionManager txMgr = CacheFactory.getAnyInstance().getCacheTransactionManager();

try

{

     txMgr.begin();

     region.put("1","1);

     region2.put("2","1);

     txMgr.commit();

}

catch(Exception e)

{

     txMgr.rollback();

}

 

Those regions are empty and have a Listener,  that in the afterCreate put the events of the empty region in a persited region.

The question is that in the case when the Listener fail, the transaction was commited and I haven't a control of that.

I need that the action in the listener is transactional and if the listener fail do a rollback.

I can do this?


Viewing all articles
Browse latest Browse all 990

Latest Images

Trending Articles



Latest Images