File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes JTA - what actions can be managed by transaction? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "JTA - what actions can be managed by transaction?" Watch "JTA - what actions can be managed by transaction?" New topic
Author

JTA - what actions can be managed by transaction?

Witold Marshal
Ranch Hand

Joined: Feb 05, 2012
Posts: 48
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

Joined: Feb 05, 2012
Posts: 48
Does anyone know something?
 
Don't get me started about those stupid light bulbs.
 
subject: JTA - what actions can be managed by transaction?