• Post Reply Bookmark Topic Watch Topic
  • New Topic

MessageContext.setSoTimeout(...)  RSS feed

 
Ravi Danum
Ranch Hand
Posts: 154
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am running a web service on Tomcat/AXIS.

I noticed from the SSL log from one of our web service clients, that a call to setSoTimeout(600000) is made.

(600000 is the value that is returned from MessageContext.getTimeout() by default.)

Does this mean that the client can tell the server how much time it wants to keep the socket open? If this value

is set to 0, it will wait forever!

Thanks in advance.

-Ravi

 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
From the Java SE API for java.net.Socket.setSoTimeout:

Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds. With this option set to a non-zero timeout, a read() call on the InputStream associated with this Socket will block for only this amount of time. If the timeout expires, a java.net.SocketTimeoutException is raised, though the Socket is still valid. The option must be enabled prior to entering the blocking operation to have effect. The timeout must be > 0. A timeout of zero is interpreted as an infinite timeout.

Best wishes!
 
Ravi Danum
Ranch Hand
Posts: 154
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks so much, Ivan.

-Ravi
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!