This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes JDBC auto-commit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "JDBC auto-commit" Watch "JDBC auto-commit" New topic
Author

JDBC auto-commit

sam jose
Greenhorn

Joined: Jul 02, 2006
Posts: 6
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
Dhanya Palanisamy
Ranch Hand

Joined: Oct 20, 2006
Posts: 61
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
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: JDBC auto-commit
 
It's not a secret anymore!