Hi
This is the problem of your database. Some DB save the
ID which called the Servlet.
The solution of your problem is:
You initalize the ConnectionPool direct (whitout to
load before) in the beginne of the class and destroy
the Connection Pool in the End of the class. Between
you d'ont use close connect.
For each Servlet will initialize the ConnectionPool
and after destroy. Inside of the Servlet you close
only the statement. So will the database simulatet,
that the user will enter always new and however you
have realy performant answers of calls to the
database.
sincerly
Reto
--- Vikas Gupta <[EMAIL PROTECTED]> schrieb:
> Hi all,
>
> i have made a connection pool servlet for holding a
> set of connections.This
> servlet is loaded before any other servlet runs.
> i am creating a pool of say 10 connections which are
> placed in a Vector in
> the connection pool servlet.
> Then in each of my servlets , in the doGet()
> (Assuming i have only doGet()
> and no doPost() ) i am calling the getConnection()
> method of the
> ConnectionPool servlet which returns the first free
> Connection in the
> Vector.
> Next after processing the database transactions i am
> closing the connection
> i.e. i am putting the connection which was obtained
> in the beginning of
> doGet() back into the pool and setting the Use flag
> to false for that
> particular connection so that other requests can get
> this freed connection.I
> am doing this at the end of doGet();
> Is there any problem if i call another servlet from
> my present
> servlet??Because then i will be getting another ,
> perhaps a different
> connection from the pool in the called servlet????
> Even in the same servlet i may get a
> different connection for
> different GET requests for the same user . Right.
> Or am i wrong somewhere ??Any suggestion!!!
> I am doing this for the first time.So i am not
> familiar with the problems i
> could face.
> Can anybody foresee any problem.
> Your help would be highly appreciated.
> Thanks.
>
>
___________________________________________________________________________
> 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
>
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
___________________________________________________________________________
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