users@jersey.java.net

Re: [Jersey] _at_EJB with jersey ?

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 25 Jul 2008 18:25:30 +0200

Felipe Gaúcho wrote:
> I have an EJB and I was wondering if I can make a reference to EJBs in
> Jersey annotated classes, something like:
>
> @UriTemplate("/test")
> public class TestService {
> @EJB
> private PricesFacadeLocal prices;
>
> @HttpMethod("GET")
> @ProduceMime("text/html")
> public String getPrice() {
> String result = "<html><head><title>Shoes list</title></head><body>";
> result += prices.getPrice(1);
> result += "</table></body></html>";
> return result;
> }
> }
>
> * I am considering to run this code on Glassfish...
>

See here:

http://blogs.sun.com/sandoz/entry/ejb_injection

Jersey is not compliant with EE yet, we are waiting for JAX-RS alignment
to EE6. But in the interim it is possible to have target support for
various aspects (or use Spring).

Paul.

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109