Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Exception caught while sending https message  RSS feed

 
pramodh somashekara
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • 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
 
Vinay Raj
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!