Olivier Billard wrote:

Hi Stefan,

I had the same pb, and I solved it the way Marco wrote, that is to say :

private field :
 - private Connection connection;

initialize (called once in the lifetime) :
 - get the datasource

dispose (called once in the lifetime);
 - release the datasource

recycle (called each time your component returns to the pool) :
 - close the connection and set it to null;

private getConnection() {
    if (connection==null)
        connection = datasource.getConnection();
    return connection;
}

and each time you need a connection, use getConnection() to get it.


For me, it works good.


OK, I will try it.

Thank you.

Stephan

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



Reply via email to