• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Exception caught while sending https message

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

We are using WebSphere 5.0 and using IBM HTTP Server to send messages from our EJB application to HTTP Server. But we are getting following exception when we try to send the messages.

Exception caught while sending https message. (sendSecureSocketMessage)
java.io.InterruptedIOException: Read timed out
at com.ibm.sslite.s.a(Unknown Source)
at com.ibm.sslite.a.read(Unknown Source)
at com.ibm.jsse.a.read(Unknown Source)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:181)
at java.io.BufferedInputStream.read(BufferedInputStream.java:199)
......

we are NOT getting this exception always but sometimes. Sometimes messages goes successfully but other times it fails.

We use JSSE to communicate within an SSL context. JSSE is introduced by the setting of the provider and a system property. This is the low level socket implementation which will allow the a socket timeout to be used. The parmaters hashmap represents the key and value pairs that will be sent in the body of the https message.

Please let me know what is the problem and the resolutions.

Thanks in advance,
Pramodh
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The most probable cause is that the socket connection is timing out. One way to fix this is by setting the timeout properties on your URLConnection object. java.net.URLConnection provides the following methods for setting timeout values. The methods are:
setReadTimeout() and setConnectTimeout().

The timeout value that you require can be determined by trial and error.
 
Joel Salatin has signs on his property that say "Trespassers will be Impressed!" Impressive tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic