users@jersey.java.net

[Jersey] Re: cdi-weld example

From: jason zhang <jasonzhang2002_at_gmail.com>
Date: Fri, 15 May 2015 21:43:12 -0700

Finally, I wrap my head around this.

I extract the weld-servlet.jar file. It contains
a META-INF/services/javax.servlet.ServletContainerInitializer which
bootstraps weld.

If
http://docs.jboss.org/weld/reference/latest-2.2/en-US/html/environments.html#_tomcat
is
missing, one can't lookup BeanManager from JNDI ( java:comp/env/BeanManager),
but CDI can be used normally.

-jason


On Fri, May 15, 2015 at 6:41 AM, Jakub Podlesak <jakub.podlesak_at_oracle.com>
wrote:

> Hi Jason,
>
> There is this weld-servlet jar packaged with the war. See
> https://github.com/jersey/jersey/blob/master/examples/cdi-webapp/pom.xml
>
> HTH,
>
> ~Jakub
>
>
> On 06 May 2015, at 18:58, jason zhang <jasonzhang2002_at_gmail.com> wrote:
>
> This is an example project under jeysey. Just wonder whether jersey
> cdi-ext library deos something to bootstrap weld.
>
> On Wed, May 6, 2015 at 2:44 AM, Marek Potociar <marek.potociar_at_oracle.com>
> wrote:
>
>> I’m afraid that you are asking a question that is out-of-scope for Jersey
>> project. Please contact the WELD guys at JBoss.
>>
>> Thank you,
>> Marek
>>
>> On 05 May 2015, at 21:31, jason zhang <jasonzhang2002_at_gmail.com> wrote:
>>
>> I compiled this example project. I used the tomcat-packaging profile. The
>> generated war file does not have anything as is document in weld
>> documentation(
>> http://docs.jboss.org/weld/reference/latest-2.2/en-US/html/environments.html#_tomcat
>> ).
>>
>> How is weld boostrapped? Is it bootstrapped by jersey?
>>
>> Thanks
>>
>>
>> --
>> -jiesheng
>>
>>
>>
>
>
> --
> -jiesheng
>
>
>


-- 
-jiesheng