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

Axis2 ConnectionPoolTimeOutException  RSS feed

 
jaya kemmannu
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using Axis2 1.5.1 for webservice calls. After making a few successful calls, I am getting the below exception after 30 seconds. I want to increase this timeout value. how this can be achieved. I have set below two parameters, but did not work.

public void send(MNPFrame mNPFrame1, String fileName, String filePath)
throws RemoteException
{
System.out.println("inside MNpservicestub send");
MessageContext _messageContext = new MessageContext();
try
{
int timeout = 60000;
System.out.println("after initiating msgCtx :: " + _messageContext);
OperationClient _operationClient = this._serviceClient.createClient(this._operations[0].getName());
System.out.println("operClient :: " + _operationClient);
_operationClient.getOptions().setAction("send");
System.out.println("send...");
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
_operationClient.getOptions().setProperty("enableSwA", "true");
System.out.println("operclient initiated");
_operationClient.getOptions().setProperty("__CHUNKED__", "false");
System.out.println("operclient initiated 2");

_operationClient.getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.SO_TIMEOUT, new Integer(timeout));
_operationClient.getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.CONNECTION_TIMEOUT, new Integer(timeout));

Logs :
org.apache.commons.httpclient.ConnectionPoolTimeoutException: Timeout waiting for connection
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.doGetConnection(Unknown Source)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.getConnectionWithTimeout(Unknown Source)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Unknown Source)
at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:400)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)

Regards,
Jaya


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