Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / November 2004

Tip: Looking for answers? Try searching our database.

DB2 poolled Connection problem

Thread view: 
David Touzart - 28 Nov 2004 16:08 GMT
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?


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.