Martin Kouba edited a comment on Feature Request WELD-718

I don't think using web-fragment.xml will help a lot.

Right now Weld implements two listeners:

  • WeldListener/WeldInitialListener should always be registered as the first listener, before any other (application) listeners
  • WeldTerminalListener should always be the last registered listener (see also WELD-1269)

So basically there are two major issues:

  • Listeners defined in web.xml must be always processed before any of the web-fragments (so that any user-defined listener in web.xml would be invoked before the weld one)
  • There can only be one <ordering> element in a web-fragment.xml, so that it's not possible to satisfy both requirements (first and last listener)

See also the Servlet spec "8.2.2 Ordering of web.xml and web-fragment.xml".

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira