File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to ensure a block of SQL statement will run in JSP without interruption