File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Java EE 7 Tutorial Volume 1 or Volume 2
this week in the
jQuery UI in Action
For update and Lock
Joined: May 15, 2009
Jul 04, 2011 07:24:28
I have to perform some action in a table which shall be synchronized with multiple instances.
I created two tables first Lock and second which contains actual data. Now each instance first tries to acquire lock on Lock table by using
Select X from Lock for update.
My application is running fine, but I have a threat that if application which have lock goes down due to any error.
Will my application work or will it stuck?
If yes how to solve it and if not then how lock will be release and how such locks work?
Thanks in Advance.
Madhan Sundararajan Devaki
Joined: Mar 18, 2011
Jul 05, 2011 02:13:04
Schedule a background process that constantly checks the Lock table for those that have been held for more than a hour and release them. I believe, this should solve your issue.
Not many get the right opportunity !
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
subject: For update and Lock
Row locking using oracle database
Lock Table issue: Need help
Transaction or Table Locking?
Locking a Oracle table using JDBC
Tests for the Data class/locking mechanism
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014