Uploaded image for project: 'JBoss Metadata'
  1. JBoss Metadata
  2. JBMETA-346

LoadOnStartup annotation of a servlet is ignored if servlet is mentioned in the web.xml even without a load-on-startup element

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.0.0.Beta31
    • None
    • web
    • None
    • Hide

      Create a web application with two servlets, A and B. Define the startup order using annotations using 1 for A and 2 for B.
      Then add a web.xml that only has a servlet tag for B and nothing else, in particular no load-on-startup element.
      JBoss 7 will then first init servlet B and then servlet A although the annotations dictate something else and the deployment descriptor does not override this setting.

      Show
      Create a web application with two servlets, A and B. Define the startup order using annotations using 1 for A and 2 for B. Then add a web.xml that only has a servlet tag for B and nothing else, in particular no load-on-startup element. JBoss 7 will then first init servlet B and then servlet A although the annotations dictate something else and the deployment descriptor does not override this setting.

    Description

      I have a servlet that defines a loadOnStartup value using an annotation.
      Additionally I have a web.xml that mentions this servlet but does not contain a load-on-startup element and is not metadata-complete.
      Then the annotated value is ignored and the loadOnStartup value falls back to a "default" of 0 (instead of -1 being the predefined default).

      I already found the bug and will attach a pull request

      Attachments

        Activity

          People

            robert.panzer_jira Robert Panzer (Inactive)
            robert.panzer_jira Robert Panzer (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: