axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ateeq Mirza" <ateeq3...@gmail.com>
Subject Threadpool webservice
Date Fri, 02 Jan 2009 16:48:04 GMT
Hi,

     The webservice I've being working on is very CPU Intensive, And more
often than not its running for over an hour. That's why I choose
'fireAndforget' MEP . But I want to add the following restriction.

1) Webservice must serve only one request at any point in time, and put the
others in a queue and serve them in FIFO fashion.

Though I've accomplished it by the putting the webservice body in a
Synchronized block, but on the development server it gives me the following
error,

 INFO HTTPSender:194 - Unable to sendViaPost to
url[******************************]
java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:129)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
        at
org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:77)
        at
org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:105)
        at
org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1115)
        at
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1373)
        at
org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1832)
        at
org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1590)
        at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995)
        at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
        at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
        at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
        at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
        at
org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:520)
        at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:191)
        at
org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
        at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327)
        at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206)
        at
org.apache.axis2.engine.AxisEngine$TransportNonBlockingInvocationWorker.run(AxisEngine.java:516)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Thread.java:534)


But by tweaking it


options.setProperty(HTTPConstants.
*SO_TIMEOUT*, *new* Integer(0));

gets rid of the aforementioned exception but gives a new one (see below) and
it retrys and consequently ends with serving a single request multiple
times.

I wanted to know is there a way to configure Axis2 engine to accomplish what
I need?


INFO HTTPSender:194 - Unable to sendViaPost to
url[**********************************************************]
org.apache.commons.httpclient.NoHttpResponseException: The
server************************failed to respond
 at
org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1835)
 at
org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1590)
 at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995)
 at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
 at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
 at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
 at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
 at
org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:520)
 at
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:191)
 at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
 at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327)
 at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206)
 at
org.apache.axis2.engine.AxisEngine$TransportNonBlockingInvocationWorker.run(AxisEngine.java:516)
 at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
 at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
 at java.lang.Thread.run(Thread.java:534)
09:35:58,774

Mime
View raw message