Originally posted by Eric Lim:
If an EJB is using JTA to manage transaction, does it matter whether your JDBC connection is set to auto commit true or false, or does it still require the auto commit flag set to false?
Thanks
Eric
Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Originally posted by Eric Lim:
The reason I asked whether you still have to set the auto commit to false in your connection to make JTA work is because I noticed that if I don't set the auto commit to false in my connection, and assuming I am inserting a record to a table, the record gets inserted straight away even if I have not yet reached the commit statement in my UserTransaction. I did this on a debug mode by stepping through the code. Maybe I missed something?
An enterprise bean should not invoke resource manager-specific transaction demarcation API methods (like java.sql.Connection.commit(), java.sql.Connection.rollback(), etc.) while within a transaction.
I'm full of tinier men! And a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|