On Wed, 2010-03-24 at 22:42 +0200, Nicklas Karlsson wrote:
You seem to know that you are doing so I'll leave the ball with
The situation we're aming for is that when people throw in web.xml:s
and web-fragment.xmls and @WebListener:s, the order (of course)
follows that of the Servlet specification but we have sneaked in the
WeldListener before that. Now how to guarantee portability, that this
has also been done when throwing the same application in another
appserver is another thing...
You can use a web-fragment.xml in your JAR with an
<ordering><before><others/></before></ordering>. It is a
but that's the only thing portable you can do without user
configuration. Your listeners will then be right after the listeners
from the main web.xml, the @WebListener from /WEB-INF/classes, and other
fragments ordered before others could compete with you.
For JBoss, probably a regular deployer would be something more robust.
Remy Maucherat <rmaucher(a)redhat.com>
Red Hat Inc