axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shantanu Sen <>
Subject Axis2: ServiceClient.setCachingOperationContext question
Date Thu, 23 Aug 2007 01:50:40 GMT
In order to use the cleanupTransport method that has been added in ServiceClient in version
1.3, it seems we need to do a setCachingOperationContext(true) on the ServiceClient to have
the getLastOperationContext return the MessageContext of the call that was invoked.

My question: what is the side-effect of setCachingOperationContext(true)? When/Why should
this be used? 

In a production environment, the ServiceClient is expected to be invoked several times at
a stretch depending on the traffic. To take care of such situation we should always reuse
a fixed number of connections and/or most definitely close the connection once we are done
with it - which is what the cleanupTransport does. If we follow the above logic, why should'nt
the setCachingOperationContext be set to true by default when the ServiceClient is instantiated
- i.e. why does the user need to set this explicity?

Can anyone throw some light on this?

Shantanu Sen

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message