• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HTTPConnection timeout

 
Greenhorn
Posts: 6
IBM DB2 Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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


 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're in luck - The JavaIoFaq talks about this very problem!
 
Vijaya Patil
Greenhorn
Posts: 6
IBM DB2 Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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



Thanks Ulf for your quick reply
 
reply
    Bookmark Topic Watch Topic
  • New Topic