Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-4163

ServiceClient - finalize() method calls super.finalize() too early

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.1
    • Fix Version/s: 1.5.1, 1.6.0
    • Component/s: client-api
    • Labels:
      None

      Description

      The finalize() method in ServiceClient.java incorrectly calls super.finalize() before cleaning up:

      protected void finalize() throws Throwable

      { super.finalize(); cleanup(); }

      This leads to EJBClassLoader errors in GlassFish when the garbage collector runs. To fix this, it should be changed to:

      // Manual finalizer chaining
      @Override protected void finalize() throws Throwable {
      try

      { // Finalize subclass state cleanup(); }

      finally

      { super.finalize(); }

      }

      See attached stack trace for details.

        Attachments

        1. stacktrace.txt
          14 kB
          Erik-Berndt Scheper

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                fbascheper Erik-Berndt Scheper
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: