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