• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JDBC auto-commit

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

Following is my understanding about setAutoCommit(boolean autoCommit) and setTransactionIsolation(int level) (both from java.sql.Connection ) :

'If I create a new db connection and use setAutoCommit(false), then perform some DB manipulation and closes the connection, by default the new connections will be in auto-commit mode.'

But if I am getting the connection object from the db connection pool, then performing the same operations and closes connection , what will be the status of that particular connection object instance when I use it again from the pool; will it be in 'auto-commit' mode or 'non-auto-commit' mode ?

Pls share your ideas

thanks in advance.

Sam
 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi sam,

As for i know, auto commit will be false even if we get connections from connection pool and you have to commit before closing the connection.

Dhanya
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic