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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.1
    • 1.5.1, 1.6.0
    • client-api
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: