I have been able to make Jersey work fine with CDI (Weld) when deployed as part of a webproject (war file) in glassfish 3.0. To do this I just had to annotate my jersey controllers with CDI annotations as noted on this newsgroup.
However, I have problems when I try the same outside a webapplication (and outside glassfish container). In particular, I have problems having CDI resources injected into jersey controllers under a simple Weld SE command line application that has an embedded Grizzly in it (i.e. Java SE app - not Java EE app).
I did find a class JCDIComponentProviderFactory that I tried to provide to GrizzlyServerFactory.create but it does not work as it gives a lot of errors about ambiguous CDI injections.
Any advice?
P.S: A little official information about how to get jersey to interoperable with CDI would be nice. Could not find anything except from 1-2 newsgroup postings that was a bit difficult to understand.
__________________________________________________
Bruger du Yahoo!?
Er du tręt af spam? Yahoo!Mail har den bedste spambeskyttelse, der findes
http://dk.mail.yahoo.com