Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-8945

Call dispose() on Components before XWiki shutdown to cleanup resources

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 5.0-milestone-2
    • 3.5, 4.0
    • Containers
    • None
    • Java 6, Tomcat 7
    • shutdown clean up component
    • Unknown
    • N/A
    • N/A

    Description

      The org.xwiki.component.phase.Initializable interface works great to initialize Components.

      However, components aren't currently given a chance to clean up resources before XWiki shutdown.

      It would make sense to call the org.xwiki.component.phase.Disposable dispose() method on components before shutdown.
      This would give components a chance to "properly clean up its resources" per the Disposable javadoc.

      This could be used by a temporary file component to delete any outstanding files before XWiki shuts down,
      or clean up database connections etc.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              jamiem Jamie Maher
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: