Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to ensure a block of SQL statement will run in JSP without interruption

 
Chuan Ren
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a block of SQLS which I need to make sure they execute. How can I ensure that all of them will run in JSP and not interrupted in a multi user environment? That is when user1 run SQL1, SQL2; user2 will not start running SQL1. Do I use synchronisation? Thank you.
-------
SQL1
SQL2
SQL3
SQL4
------
 
Malhar Barai
Author
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi..
Thats what exactly "synchronisation" is meant for. Make the methods in your bean synchronized.
hth
MB
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic