Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / September 2004

Tip: Looking for answers? Try searching our database.

Deadlocking in Java program

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Johnny - 27 Sep 2004 21:39 GMT
Hiya,

I've been getting some deadlocking that I've never seen before. I
rewrote just over 10,000 lines of code, so I can't really go back and
comment out what I've done. In a nutshell, could my deadlock be
related to how I'm creating the PreparedStatement? The old code just
called con.prepareStatement(sql), but the new code needed the
ResultSet to be scrollable...

PreparedStatement staGetOpenOrders = con.prepareStatement(sql,
ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);

Also, in the short term, can I set the deadlock timeout to something
shorter than the apparent default? Looks like it's about 3 minutes.

Thanks, JC
Sean McKeough - 30 Sep 2004 19:10 GMT
Default deadlock detection time can be changed in the dbm config file.
To see what statements are deadlocking you can use a deadlock event
monitor with details (see the sql ref, 'create event monitor' section).

> Hiya,
>
[quoted text clipped - 12 lines]
>
> Thanks, JC
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.