This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Where do I need synchronization in Servlets? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Where do I need synchronization in Servlets?" Watch "Where do I need synchronization in Servlets?" New topic
Author

Where do I need synchronization in Servlets?

Jim Smithian
Greenhorn

Joined: Sep 21, 2004
Posts: 18
I am writing some servlets which allows users to store and retrieve information in MySql database. I am using TOMCAT 5.0.28 and J2EE.

I have configured Tomcat for connection pooling and it works. Servlets use a database agent for access to database. Many user may access to server at the same time.

My questions are:

Where do I need synchronization?
Does Tomcat take care of synchronization?
Do I need to create threads in servlets to respond to request?

Can anybody explain to me or refer me to somewhere where I can find some information.

Thanks.

Jim
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
i think you had better read something on

- servlet lifecycle
- servlet request/response mechanism


and no tomcat (your servlet container) do not takecare of synchronization stuff.
 
Consider Paul's rocket mass heater.
 
subject: Where do I need synchronization in Servlets?
 
Similar Threads
How can servlets sent XML files?
Java.exe application error
Help using Hypersonic DB with Tomcat
Hypersonic DB and Tomcat Question
Optimizing Database Connection ?