Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

does the Oracle JDBC driver auto-commit?

 
Stephen Huey
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We've just moved to Oracle, and I've noticed that if I log into the same db user with the command-line SQL*Plus to execute updates on the database, one user won't see what another user has done until you explicitly type commit. However, when our web application interacts with the database, the users on the console can see the changes immediately. Do you think the Oracle JDBC thin client auto-commits whatever our web app does?
 
David Harkness
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I've found that Oracle's thin driver does auto-commit by default. You can change this by usingSome connection pools like Apache's DBCP allow you to set this at the pool level.
 
Al Tam
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are accessing the DB through a EJB container, such as JBoss or Weblogic, the container will automatically turn-off the auto-commit functionality of the driver.
 
Stephen Huey
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok...no EJB container here...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic