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

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

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment