Hello,
I try to use a pooled Connection, I use DB2DataSource.
I take a Connection from this pool,with function getConnection()...I close
this connection with the classic close function ,
but if I try to Do this, forty times in my program , I catch a SQLException
: all connections are already in use...
what matter ?
What have I to do to release the connection ?
Other problem..
If I want to use a connection after used the execute function from object
PrepareCallSatatement , my program sometimes freeze when I execute the same
function execute . MayBe the Object connection was bad (but it's not close).
How can I get back the statement of the Connection (and try to close the bad
connections), or know why my program freeze ?
I use UDB personal edition 8
Thank you
David
Anzime - 29 Nov 2004 03:27 GMT
> Hello,
>
[quoted text clipped - 16 lines]
>
> David
Are you closing all connections in finally blocks?

Signature
Regards,
Anzime
david.touzart - 29 Nov 2004 20:14 GMT
Yes a simple test like this :
DataSource Db=new Datasource()
for (int i=0;i<100;i++) {
Connection con=Db.getConnection()
con.close()
}
...and when i=38 I have a SQLException, like "all connections are in use
..."
is it a bug with UDB V 8 ?
I don't find any answers..or fix
.please if you could help me.
thanks a lot !
> > Hello,
> >
[quoted text clipped - 18 lines]
>
> Are you closing all connections in finally blocks?