Hi all:
 
I want to make a class that provides to his sub-classes a complete number of methods to open, retrieve information, close... a Connection to a Database. My idea is that the first called servlet, open the Connection to the database and the Servlets called from this one, take profit of this connection and retrieve data from the BD. The last servlet is put in charge of close the connection and send data to the browser. For all of this, the connection is declared static (to share it to servlets). The problem is when two users access at the same time to the servlets, because the first user open de connection and close it while the second is using it. Any suggestion??.
 
Any idea will be appreciated.
 
Thanks in advence.
 
Di

Reply via email to