在設(shè)置超時(shí)之后,依然在60秒后保超時(shí)錯(cuò)誤,很是無(wú)語(yǔ),網(wǎng)上也找了很久,API 也看了。最后發(fā)現(xiàn)是1.5的Axis2 由此bug。用1.6.2版本之后就沒(méi)有問(wèn)題了。
Axis2 java.net.SocketTimeoutException: Read timed out
@import url(http://www.tkk7.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);
//設(shè)置超時(shí)
// This enables the user to pass in socket timeout value as an Integer. If nothing is set, the default value is 60000 milliseconds.
options.setProperty(HTTPConstants.SO_TIMEOUT, new Integer(600000));
// This enables the user to pass in connection timeout value as an Integer. If nothing is set, the default value is 60000 milliseconds.
options.setProperty(HTTPConstants.CONNECTION_TIMEOUT, new Integer(600000));
options.setTimeOutInMilliSeconds(600000L);