>    First of all, there are several connection pools avaiable, so you
> might want to look at those before you decide that re-inventing the wheel
is
> a good thing.

I am already evaluating some of the available products, and most probably
use one of them, thank you.

>    Second, most connection pools work by using static classes.  Your
> code would look something like:
>
>    Connection conn = ConnectionPool.getConnection();
>
> and the ConnectionPool would look something like:
>
>    public static Connection getConnection()

This sounds good, but if the class is static; then it cannot hold any data
(am I wrong?), that's why they invented the application scope in servlet
containers. A pool is basically a cache, and if you cannot hold the data
(the connection handles, timeout periods etc) it cannot re-use the
connections.

The pools I saw were implemented as servlets, and they do not get destroyed
as far as the servlet container is running. But I cannot (and don't want
to) access servlet methods from my own classes.

Any ideas?
Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to