Iv�n: Declare your pool as static and initialise it in the init() method of your LoginHandler class. That should solve your problem.
Regards, Geeta Iv�n Escobedo wrote: > hi everybody i have a difficult problem to explain, cause my english is not > so good, so, i'll try to make myself clear. > > I need to connect to a database thru the jdbc driver to sybase. > I already have a connectionPool.class > I made a execSQL.class that executes commands to the database, like, queries > and updates, this execSQL.class request connections to the > connectionPool.class > ExecSQL.class has a public method where I establish the IP, Port, > Databasename, initial and maximun conenctions, etc, so, the > connectionPool.class knows where to make the connections. > I have a servlet class called LoginHandler.class where I instanciate a > ExecSQL.class to validate the user. > > The problem is this: > Every time i reload the loginHandler.class it creates N (initial) > connections to the database no matter the existents. I guess it is > instantiating an entire new connectionPool. > What I need is that every different class i use that instanciates a > execSQL.class use the same connectionPool already created. > How can I do this? What do I have to change in the classes above? > > Note: Only the loginHandler is a servlet. execSQL.class and connectionPool > are ordinary classes, and connectionPool.class implements Runnable. > > thanks > > _________________________________________________________________ > MSN Photos es la manera m�s sencilla de compartir e imprimir sus fotos: > http://photos.msn.com/support/worldwide.aspx > > ___________________________________________________________________________ > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > of the message "signoff SERVLET-INTEREST". > > Archives: http://archives.java.sun.com/archives/servlet-interest.html > Resources: http://java.sun.com/products/servlet/external-resources.html > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
