This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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
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