Forums Register Login

HTTPConnection timeout

+Pie Number of slices to send: Send
Hi,

I am using a client app in which we need to make a SSL connection to the HOST. This code is written in a class and called from struts action class.



Now when the host is down for some reason the connect call keeps trying for 5 minutes blocking the underlying socket resources. The sockets getting blocked are more in number so this results in db connections getting queued. Once 5 min is over the queued request are processed and there is DB spike happening.

Since the code base uses JDK 1.4 I cannot use the setConnectTimeout() method.
I will really appreciate your help in knowing how can i stop blocking my resource for 5 minutes? Or Can I use any time counter of my own to forcefully avoid waiting for more time and refuse connecting?

Thanks a lot
Vijaya


+Pie Number of slices to send: Send
You're in luck - The JavaIoFaq talks about this very problem!
+Pie Number of slices to send: Send
 

Ulf Dittmer wrote:You're in luck - The JavaIoFaq talks about this very problem!



Thanks Ulf for your quick reply
catch it before it slithers away! Oh wait, it's a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1254 times.
Similar Threads
To find the run time connection pool size in jboss3.2.1
Oracle datasource connection timeouts?
Jboss connection pool not releasing the connection from pool
DatasourceRealm just ain't working
getting errors while running duke's bank application
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 06:54:29.