> Hi Tim,
>
> I am managing a connection pool.
> Everytime I am accessing, I am creating
> a new Connection.
>
> Regards
> Partha
>

Hi Partha,

What is probably happening is that you are creating a new connection for
each request and not closing
them afterwards. This would explain why, after 100 hits, it slows down as
Access has to fiddle about making
a connection free for you.

Connection pooling means you only ever create the connections when the
servlet is first loaded (via the init method)
grab one from the pool for each request, releasing it when you are done
(returning the connection to the pool).
When the servlet destroy method is called you close all the connections.

Connection pooling has to be thread safe and also have some mechanism for
handling the cases where the pool is empty
but requests are pending. Jason Hunter has an example of a class that could
be used for connection pooling in his book
Java Servlet Programming. I recommend you reading it for this and much more
besides.

Hope this helps

Andy Bailey

___________________________________________________________________________
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

Reply via email to