[weld-dev] registering the Weld Servlet listener in a web.xml fragment or TLD

Dan Allen dan.j.allen at gmail.com
Thu Oct 7 15:06:25 EDT 2010


On Thu, Oct 7, 2010 at 2:47 PM, Nicklas Karlsson <nickarls at gmail.com> wrote:

>
>
> Btw, we are already including other automatic configurations, such as a JSF
>> phase listener and view handler (META-INF/faces-config.xml).
>>
>> Worthy of a JIRA?
>>
>>
> Yes, auto-registration would be nice. I though there was a JIRA for this.
> It's important that the Weld listener kicks in early if people want
> injection to work in their own servlet listeners. Would it be worth the
> effort to coordinate with OWB/CanDI on a common name (CDI-IMPL)? so that
> people can take it into account if they write CDI modules that need to know
> at which point it can be found in the fragments?
>

Ordering leads more to web-fragment.xml as a solution, since it's possible
to have ordering control. There is no guarantee as to when a listener will
load that's defined in a TLD (the advantage is only for non-Servlet 3.0
containers). Given that Weld is a new programming model and likely to be
used with newer containers, then I'd say we should go with web-fragment.xml.

(Worse case scenario is we introduce a classifier for weld-servlet that will
be for pre-Servlet 3.0 environments. Something like
org.jboss.weld.servlet:weld-servlet:1.1:pre-servlet-3)

-Dan

-- 
Dan Allen
Principal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597

http://mojavelinux.com
http://mojavelinux.com/seaminaction
http://www.google.com/profiles/dan.j.allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20101007/003796e4/attachment.html 


More information about the weld-dev mailing list