File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and the fly likes oracle - blocking reads Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "oracle - blocking reads" Watch "oracle - blocking reads" New topic

oracle - blocking reads

Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 29220

In our Oracle 9 application, the read only (JDBC) queries block when we are updating the database. The updates occur within entity beans in a transaction with an isolation level of committed.

Is it possible to get the queries to retrieve the last committed data rather than block?

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
By saying updating database, you mean updating some particular rows of a particular table, right??

if it is like that then the behaviour is wiered.

Because in oracle, while updating rows, the previous committed rows, that are being changed, is written to a rollback segment. And when some other user executes query on that table then he/she doesn't get the uncommitted changed rows, but committed old rows from rollback segment.
Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 29220

Yes, I mean updating some rows in a database.

Thanks for confirming my understanding of this at least. I guess I'll experiment with transaction settings to see if I am somehow supressing this behavior.
I agree. Here's the link:
subject: oracle - blocking reads
Similar Threads
Logging of SQL Queries with J2EE SDK
Problem with inserting blob
Question on locks and AutoCommit
how to find out 3rd max salary from an emp table?
Complex SQL Statements