aspose file tools*
The moose likes JSP and the fly likes How to ensure a block of SQL statement will run in JSP without interruption Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "How to ensure a block of SQL statement will run in JSP without interruption" Watch "How to ensure a block of SQL statement will run in JSP without interruption" New topic
Author

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

Chuan Ren
Ranch Hand

Joined: Aug 04, 2003
Posts: 42
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

Joined: Aug 17, 2001
Posts: 399
hi..
Thats what exactly "synchronisation" is meant for. Make the methods in your bean synchronized.
hth
MB


Malhar Barai
SOA & Java Book
 
 
subject: How to ensure a block of SQL statement will run in JSP without interruption