Axis2
  1. Axis2
  2. AXIS2-3218

Client sender connections not cleaned up when AxisFault received.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2, 1.3
    • Fix Version/s: None
    • Component/s: codegen
    • Labels:
      None
    • Environment:
      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.

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Amila Chinthaka Suriarachchi
              Reporter:
              Aaron Gourley
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development