A bit more description for my case, the server side is a simple web service,
for the client side, the codes are something like :
--->
Service service = new HelloService();
Dispatch dispatchJaxb = service.createDispatch(PORT_QNAME,
JAXBContext.newInstance(org.test.ObjectFactory.class),
javax.xml.ws.Service.Mode.PAYLOAD);
dispatchJaxb.invokeOneWay(new HelloRequest());
<---

After adding some code fragments in the finally block of
BaseDispatch.invokeOneWay method, it looks to me work fine.
--->
try {
                if (requestMsgCtx != null &&
requestMsgCtx.getAxisMessageContext() != null) {
                    org.apache.axis2.context.MessageContext axisMsgCtx =
requestMsgCtx.getAxisMessageContext();
                    if (axisMsgCtx.getTransportOut() != null &&
axisMsgCtx.getTransportOut().getSender() != null) {

 axisMsgCtx.getTransportOut().getSender().cleanup(axisMsgCtx);
                    }
                }
            } catch (Exception ignore) {
            }
<---

I also googled this issue, and do found a lot of information for the same
timeout exception, also read some related codes
a. In the HttpSender, there is a method named cleanup, which is used to
release the connection, but it has the precondition to configure the
AUTO_RELEASE_CONNECTION. And actually I did not see other setting
configurations in the Axis2 codes, and think that it should be configured by
the users in the Options ?
b. Some posts in the mail list recommended to call the
getTransport().cleanup() in the Axis2 specific client codes. And in the
testing scenario above, since the standard JAX-WS API is used, suppose that
Axis2 should do this ?
And very appreciated with any comment ? Thanks.

2011/5/30 Ivan <[email protected]>

> Hi, I got an exception
> of org.apache.commons.httpclient.ConnectionPoolTimeoutException: Timeout
> waiting for connection while using Dispatch.invokeOneWay method for some
> times. After checking the codes in the BaseDispatch.invokeOneWay method, I
> did not find the related codes which were used to release the connection. Is
> there a connection leak here ? Thanks.
>
> --
> Ivan
>



-- 
Ivan

Reply via email to