• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Joe Ess
  • salvin francis

Transactions ACID Advice

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
And tomorrow is the circus! We can go to the circus! I love the circus! We can take this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!