Connection timeouts
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 83
- Joined: Wed May 20, 2009 1:18 pm
Connection timeouts
Hi,
I have a problem when attempting to connect to an extrernal web application from within an Author Operation. The external web app can take several minutes to return a result, and therefore I have set the readTimeout and connectionTimeout to be 10 minutes. Unfortunately my timeout values seem to be being ignored at some point in the connection stack as I get read timeout execptions after about 30s.
My suspicion is that the Oxygen connection classes are ignoring my timeout values; can you clarify whetever this is liekly to be happening?
An example of my connection code is:
the stack trace of the timeout exception is:
I have a problem when attempting to connect to an extrernal web application from within an Author Operation. The external web app can take several minutes to return a result, and therefore I have set the readTimeout and connectionTimeout to be 10 minutes. Unfortunately my timeout values seem to be being ignored at some point in the connection stack as I get read timeout execptions after about 30s.
My suspicion is that the Oxygen connection classes are ignoring my timeout values; can you clarify whetever this is liekly to be happening?
An example of my connection code is:
Code: Select all
hc = (HttpURLConnection) connection;
hc.setConnectTimeout(CONNECTION_TIMEOUT);
hc.setReadTimeout(CONNECTION_TIMEOUT);
responseCode = hc.getResponseCode(); < exzeption thrown here
Code: Select all
rg.apache.commons.httpclient.HttpException: Read timed out (http://XXX.XXX.XXX.XXX:XXXX/validate/;jsessionid=EA83830A80ECBA4D915F76EDA0AC35F4?wicket:interface=:1:repeater:97:chunk::ILinkListener::)
at ro.sync.net.protocol.http.A.A(Unknown Source)
at ro.sync.net.protocol.http.A.A(Unknown Source)
at ro.sync.net.protocol.http.A.A(Unknown Source)
at ro.sync.net.protocol.http.WebdavHttpURLConnection.getInputStream(Unknown Source)
at ro.sync.net.protocol.http.WebdavHttpURLConnection.getResponseCode(Unknown Source)
at uk.co.smg.acm.oxygen.framework.cobra.OxygenRenderContext.submitFormSync(OxygenRenderContext.java:241)
at org.lobobrowser.html.test.SimpleHtmlRendererContext$1.run(SimpleHtmlRendererContext.java:249)
Feb 12, 2010 3:30:46 PM org.lobobrowser.html.test.SimpleHtmlRendererContext warn
-
- Posts: 9439
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Connection timeouts
Hello Simon,
Indeed Oxygen has its own implementation of HttpURLConnection so
creating an URL Connection like:
will return our own implementation.
Our implementation is not very compatible with the Java SUN implementation and only looks at the timeout set in the Oxygen
HTTP(S)/(S)FTP/Proxy Configuration / Advanced HTTP Settings
Preferences page.
We made some fixes to our URLConnection implementation to also use the setConnectionTimeout(), fixes which should be available in Oxygen 11.2.
In the meantime:
If you want to use the standard SUN HTTP URL Connection implementation you can use code like:
Regards,
Radu
Indeed Oxygen has its own implementation of HttpURLConnection so
creating an URL Connection like:
Code: Select all
new URL("http://www.oxygenxml.com").openConnection()
Our implementation is not very compatible with the Java SUN implementation and only looks at the timeout set in the Oxygen
HTTP(S)/(S)FTP/Proxy Configuration / Advanced HTTP Settings
Preferences page.
We made some fixes to our URLConnection implementation to also use the setConnectionTimeout(), fixes which should be available in Oxygen 11.2.
In the meantime:
If you want to use the standard SUN HTTP URL Connection implementation you can use code like:
Code: Select all
sun.net.www.protocol.http.HttpURLConnection httpURLConnection = new
sun.net.www.protocol.http.HttpURLConnection(new
URL("http://www.google.com"), null);
httpURLConnection.connect();
InputStream inputStream = httpURLConnection.getInputStream();
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service