The moose likes JDBC and the fly likes select for update --> OCI8 driver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "select for update --> OCI8 driver" Watch "select for update --> OCI8 driver" New topic

select for update --> OCI8 driver

Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

can anyone give me some insight on this(second hand info, so it may be vague):
We have written an java program that accesses an Oracle DB using the thin drivers. We now have to move our program (that used to be limited to our network) to remote locations. To do this we needed to switch to the OCI8 drivers to deal with the firewall/security issues. After changing the drivers to OCI, our program started locking up for no apparent explainable reason. At the time, we were testing within the network. The procedure that seems to be locking it is "select...for update". No Exceptions are thrown, it just locks. Our DBA verified that the record was NOT locked at the time of hanging(so it wasn't waiting for a lock to be released).
some hypothesis to help me investigate this matter would be helpful. The more details I get, I'll relay them to you.
Daniel Dunleavy
Ranch Hand

Joined: Mar 13, 2001
Posts: 276
If it was waiting for a lock to be set, I believe there is a parameter in Oracle which sets the amount of time to wait for a lock before failing.
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

we have just solved the problem. We were using an older driver version of classes12.zip for the OCI driver. Once we updated it to a newer version, everything worked fine.
Thanks for the reply Dan,
I hate incompatiblility errors! I have been looking at the code for 2 days now! Oh well, at least I will sleep well this weekend!
I agree. Here's the link: http://aspose.com/file-tools
subject: select for update --> OCI8 driver
Similar Threads
Read Uncommitted in Sql Server
Confused about Locking
Data class lock testing - is it necessary to test create and delete implementations?
How does Java work with Oracle?
Significance of ResultSet.setFetchSize()