Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.2, 1.3
-
None
-
None
-
Windows XP, Java 5
Description
I suspect that lines 439-513 of java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl has a bug. This bug results in generated stubs not cleaning up their connections properly.
The following line (491) is only called on a successful request:
_messageContext.getTransportOut().getSender().cleanup(_messageContext);
If an AxisFault is thrown, then the message context is not cleaned up and the connection is not closed properly.
I propose the following fix:
- Remove line 491
- Insert the following before line 439 (i.e. before "_operationClient.execute(true);")
try
{ - Insert the following before line 514: }finally
{ _messageContext.getTransportOut().getSender().cleanup(_messageContext); }This will force that cleanup be called on the message context after every execution of the operation. I realize that Axis2 1.3 has added Options.setCallTransportCleanup() method and a ServiceClient.cleanupTransport() method for this (which is good), but this fix might hit one of the root causes of stale connections being left open.
I'll attach my version of the modified xsl file (used Axis2 1.3 source release as starting point). Verified that the problem still exists in trunk.
Attachments
Attachments
Issue Links
- is related to
-
AXIS2-4586 JiBX Client Stub not cleaning up HTTP connections after each operation
- Resolved