Hi, My application is about online exam with java servlet as tool, tomcat 3.2.3 as server solution , mysql 3.49 as the backend. considering 180 students take the exam at same time within 50 minutes, there are a lot of transactions with database. what i did right now is to define connection in local variable(within doGet or doPost method), every time this servlet is called, new connection is created. after transaction is done, this connection is closed. I am worrying the speed.(it will comsume a lot connection and time for open new connection).
so I am thinking to define connection as instance variable in every servlet, so it can save sometime to open new connection. However, I am not sure if it will cause multi-thread problem? How and when i can close the connection. ______________________________________________________________________ Find, Connect, Date! http://personals.yahoo.ca --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php