Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTA - what actions can be managed by transaction?

 
Witold Marshal
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What can be transacted by JTA transactions with UserTransaction and container managed transaction?
I know for sure that all call (statements) to data base and also sending and receiving IMS messages can be performed in bounderies od transaction which allow two withdraw those action on rollback. In the beginning I thought that everything (all methods) included in scope of transaction (begin() commit() ) is a part of taht transaction and can be rolled back. But I made an example of remote client application (distributed transaction) which was conceting with a stateful EJB on my server (JBoss) and was callig methods of that bean in transaction mode (UserTransaction started on client side). This methods were simply changing values of beans fields (stateful bean !). It is working fine in standard way but when I change commit() at the end of the transaction into "rollback()" this action is not drawing back called earlier methods. The bean fields remain changed by methods as there was no "rollback()" invokation in my code. Is it normal? JTA transactions don't influence EJB methods that are not connected with JDBC and JMS operations?
 
Witold Marshal
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know something?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic