467,134 Members | 917 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,134 developers. It's quick & easy.

Deadlocking in Java program

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
Nov 12 '05 #1
  • viewed: 1468
Share:
1 Reply
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).

Johnny wrote:
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

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

73 posts views Thread by RobertMaas@YahooGroups.Com | last post: by
114 posts views Thread by Maurice LING | last post: by
30 posts views Thread by Mike Cox | last post: by
1 post views Thread by =?Utf-8?B?S2Vubnk=?= | last post: by
reply views Thread by markthien | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.