Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java.sql.sqlexception: lock wait  RSS feed

 
Silpa Sunkavalli
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a question regarding the java.sql.sqlexception: lock wait
timeout exceeded; try restarting transaction
with respect to following code


I would like to catch the Lock wait timeout exceeded SQLException and
try executing the insert statement one more time,before throwing the
SQLException (if it failed for the 2nd time).I was wondering if it is
good practice to catch
the Lock wait timeout exceeded SQLException.Any suggestions or other approaches to achieve the result is highly
appreciated.
Thanks for the help,
Silpa.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!