Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Address In Use

 
Kerem Ozen
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I've a problem with JDBC Connection. In a thread I'm trying to connect a database (MS SQL Server 2000) in a infinite loop. Every time I open connection, do some data editing and close connection with Connection's close() method. But I think there is a bug in Windows. Even if i closed the connection, windows doesn't close the port and the connection gives "Address in use" error.
I tried to use connectionPool to get connections. When their job is finished I closed them and give back to the pool. But there is still that "Address in use" problem. After a number of loop it gives this error.
Can you help me Why this error happens and how can i fix it?

Thanks a lot...

Kerem
 
Jeff Pavlocak
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post the code for your loop? Also your opening and closing connections code.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!