jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases and the fly likes Address In Use Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Address In Use" Watch "Address In Use" New topic

Address In Use

Kerem Ozen

Joined: Jul 06, 2004
Posts: 1
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...

Jeff Pavlocak

Joined: Apr 26, 2004
Posts: 16
Can you post the code for your loop? Also your opening and closing connections code.
I agree. Here's the link: http://aspose.com/file-tools
subject: Address In Use
jQuery in Action, 3rd edition