File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Dead lock issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Dead lock issue" Watch "Dead lock issue" New topic

Dead lock issue

Arun Kumar
Ranch Hand

Joined: Jan 21, 2005
Posts: 133

Hi All,

We have a scenario in which on process inserts a new record to the table.After 5-10 seconds another process selects this record and updates the value of one of the field

This is a continuous process and after some time we are getting a dead lock

Will an insert and after some time a select and Update create a deal lock
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Will an insert and after some time a select and Update create a deal lock

It shouldn't. How have you verified it is a deadlock you are seeing?

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Sree Chinna
Ranch Hand

Joined: Jul 15, 2008
Posts: 42
It is not a deadlock but what you might be facing is database locks.

Which database are you using ?
At what point do you commit ?
Whether the updations are done in same session or different ?
What is the transaction level ?
[ July 16, 2008: Message edited by: Sree Chinna ]
I agree. Here's the link:
subject: Dead lock issue
It's not a secret anymore!