Hi,
I am developing a multi - user application using jsp, some java
classes(eg.Contract) which I have in a package and import into the jsp
page. Contract has methods for adding, updating, deleting etc.
This is how I use this class in my jsp page.
<% Contract mycontract = new Contract();
mycontract.add(myobject);
%>
I have not declared these methods as static, nor do I have any static
variables within these java classes. All methods are public and variables
are private to method or class.
My question is :
1. Do I have to declare my add , update methods as synchronized in Contract
class?
2.Do I have to synchronize the block where it is called in the jsp page? Or
synchronize them both to prevent concurrency problems?
I am not clear about this. I hope someone out there can help me with my
query. Many thanks for any hints.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets