I tried using latest 3.0.3 snapshot (from Jan 27) - same problem.
I am using resin.
Here is the code (cleanup a bit for readability) from the class UserMangerImpl:
UserTransaction utx= null;
Context context = new InitialContext();
utx = (UserTransaction) context.lookup("java:comp/UserTransaction");
logger.info("user TX before start of TX: "+utx+", status:
"+utx.getStatus());
utx.begin();
logger.info("started user TX: "+utx+", status: "+utx.getStatus());
try {
//update cache here
//update db here
//throw dummy exception here
throw new RuntimeException("test");
logger.info("committing tx");
utx.commit();
} catch (Exception e) {
logger.info("rolling back tx");
utx.rollback();
}
logger.info("User TX:"+utx+", status: "+utx.getStatus());
Here is relevant output (app output removed):
14:58:33,461 [http--8080-0$20568209] INFO UserManagerImpl:updateUser:58 - user TX before
start of TX: UserTransactionProxy[], status: 6
14:58:33,463 [http--8080-0$20568209] INFO UserManagerImpl:updateUser:63 - started user
TX: UserTransactionProxy[], status: 0
14:58:33,463 [http--8080-0$20568209] DEBUG NearCacheImpl:setValue:53 - setting value for
object:/user/1:86 in cacheId:3
14:58:33,465 [http--8080-0$20568209] INFO TMCacheListener:onNodeTransactionregistered:29
- : EventImpl{type=TRANSACTION_REGISTERED,pre=false,
cache=org.jboss.cache.DataContainerImpl [2 nodes, 0 locks], modificationType=null,
data=null, fqn=null, transaction=Transaction[01:730c2f36], originLocal=true,
targetFqn=null, successful=false, newView=null, buddyGroup=null}
14:58:33,476 [http--8080-0$20568209] INFO TMCacheListener:onNodeEvent:41 - :
EventImpl{type=NODE_MODIFIED,pre=true, cache=org.jboss.cache.DataContainerImpl [2 nodes, 0
locks], modificationType=PUT_DATA, data={d=TMUserImpl{_id=1:86, _username='asdf',
_SLUsername='', _password='sdf{salt}', _email='asdf(a)xomc.om233',
_userStateCd=A}}, fqn=/user/1:86, transaction=Transaction[01:730c2f36], originLocal=true,
targetFqn=null, successful=false, newView=null, buddyGroup=null}
14:58:33,492 [http--8080-0$20568209] INFO TMCacheListener:onNodeEvent:41 - :
EventImpl{type=NODE_MODIFIED,pre=false, cache=org.jboss.cache.DataContainerImpl [2 nodes,
0 locks], modificationType=PUT_DATA, data={d=TMUserImpl{_id=1:86,
_username='asdf', _SLUsername='', _password='sdf{salt}',
_email='asdf(a)xomc.om233', _userStateCd=A}}, fqn=/user/1:86,
transaction=Transaction[01:730c2f36], originLocal=true, targetFqn=null, successful=false,
newView=null, buddyGroup=null}
14:58:33,572 [http--8080-0$20568209] INFO UserManagerImpl:updateUser:95 - rolling back
tx
14:58:33,574 [http--8080-0$20568209] INFO TMCacheListener:onNodeTransactioncompleted:24 -
: EventImpl{type=TRANSACTION_COMPLETED,pre=false, cache=org.jboss.cache.DataContainerImpl
[2 nodes, 0 locks], modificationType=null, data=null, fqn=null, transaction=Transaction[],
originLocal=true, targetFqn=null, successful=false, newView=null, buddyGroup=null}
14:58:33,612 [http--8080-0$20568209] INFO UserManagerImpl:updateUser:103 - User TX:
UserTransactionProxy[], status: 6
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206063#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...