The moose likes JDBC and the fly likes Transactions  ACID Advice Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Transactions  ACID Advice " Watch "Transactions  ACID Advice " New topic
Author

Transactions ACID Advice

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I am executing a transaction against a single database.
AND HANDLE IT SO:
Connection.setAutocommit(false); // for ATOMICITY of ACID
Connection.setIsolationLevel(TRANSACTION_READ_COMMITTED); // for ISOLATION of ACID

PROBLEM:
I guess setAutocommit(false); is a Must FOR the 2nd stage... true?
B'cos I have some special insert queries which must execute in autocommit(true) modus. But I am handling all the DB-Story in a central way. I donot want to write extra if else else code for only those special conditions; in which I just do some insert and I am sure at least one of the fields of the indexes that are used will have a different value..
 
I agree. Here's the link: http://zeroturnaround.com/jrebel
 
subject: Transactions ACID Advice
 
Similar Threads
Transaction Management in JDBC
Posting a form to a hidden frame in the same page
Issue while commiting to the DB "you cannot commit with autocommit set to true"
Confusion in Equals ,== and Hashcodes
Select query not working with Jdbc for transactional calls.