aspose file tools*
The moose likes Servlets and the fly likes servlets performances Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlets performances" Watch "servlets performances" New topic
Author

servlets performances

ray bond
Ranch Hand

Joined: Oct 11, 2000
Posts: 111
my servlet's main functionality is "parsing incoming data from applets and then inserting into database (not data but only update statements)." , i have already separated servlets to multipule so that single servlet do not take all the load , but can you please tell me that,
- should this servlet implement "SingleThreadModel" or not ?
- the methods which parse data and insert into database , should those methods be "synchronized" methods or not ?
- right now whenever servlet initialized , i open the database connection and the use that statment through out all the methods , is it good implementation for interaction with the database or not. ?
- there are multipule servlets for different data but they all perform same tasks , so when there are number of servlet , is tomcat is good enough to handle these many instances of servlets ,
- what is the limitation of tomcat , what is good option for tomcat for above requirments. ?
thanks
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12781
    
    5
1. Do not use SingleThreadModel
2. Since creating a database connection is very time consuming, use a database connection pool.
3. Your limitation is going to be the db connection speed, not the Tomcat speed.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: servlets performances