Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5146

Application not destroyed if WicketFilter#init() fails

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.10, 6.7.0
    • 6.8.0, 1.5.11
    • None
    • None

    Description

      WicketFilter calls Application#initApplication() which calls Application#init().

      In case of Exception thrown in the application's init() method, there is no cleanup in WicketFilter's finally block.

      The result of this is, in case where Wicket is in the application server's libraries (not deployed with the war file), that the application cannot be re-deployed withhout re-starting the application server.

      That is because Application#setName() crashes with IllegalStateException("Application name can only be set once.").

      In Application, private static final Map<String, Application> applicationKeyToApplication holds a reference to the crashed instance after the application is undeployed.

      Attachments

        Activity

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

          People

            svenmeier Sven Meier
            bht@actrix.gen.nz bernard
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment