[jboss-jira] [JBoss JIRA] (JBMETA-346) LoadOnStartup annotation of a servlet is ignored if servlet is mentioned in the web.xml even without a load-on-startup element
Robert Panzer (Commented) (JIRA)
jira-events at lists.jboss.org
Sat Dec 10 09:16:09 EST 2011
[ https://issues.jboss.org/browse/JBMETA-346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649811#comment-12649811 ]
Robert Panzer commented on JBMETA-346:
--------------------------------------
I will provide a test case that shows the error on monday when I am back to work.
I did not want to change the whole logic because I did not understand it fully yet.
But if there is a problem like this for instance when defining a servlet in multiple web-fragment.xmls it must have been there before.
One point I really dislike about the special treatment of nulls or illegal content like defining it as zero is that it changes the way servlets get initialized without giving the user any hint. I would prefer giving the user a proper error message on which he can react. In particular after following the discussions on the mailing lists regarding validation of deployment descriptors where the common opinion was that DDs should not be validated and the well known tolerant handling should be used.
> LoadOnStartup annotation of a servlet is ignored if servlet is mentioned in the web.xml even without a load-on-startup element
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: JBMETA-346
> URL: https://issues.jboss.org/browse/JBMETA-346
> Project: JBoss Metadata
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: web
> Environment: JBoss 7.1.0.CR1-SNAPSHOT, Win7 64Bit, JDK 1.6.0-29 64Bit
> Reporter: Robert Panzer
> Assignee: Robert Panzer
>
> 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
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list