users@glassfish.java.net

Re: JAX-RS in GF 2.1 and EJB injection?

From: <glassfish_at_javadesktop.org>
Date: Wed, 21 Apr 2010 03:12:24 PDT

Hi,

good news - jersey jax-rs works now in Glassfish 2.1 with EJB annotation :)
I am using
 - jersey-core-1.1.5.1.jar
 - jersey-server-1.1.5.1.jar
 - jsr311-api.1.1.1.jar

to get the missing ejb injection I have added the EJBProvider you provided in your example application.
This provider works in GF2.1 and also in GF3.0 (I bundled the provider with my REST service classes)

And (very important!) I inject now the Remote Interface of my EJB not the Local Interface!

I have now two additional questions:

1. why did you not bundle this EJBProvider together with jersey-server and provide an servlet init-param to configure if the EJBProvider should be used (for JEE5) or not (for JEE6)

2. Did the fact that I am forced to use remote interfaces of my EJBs a performance issue? Did you think the the resulting code is less performance in JEE6 as if I would use the local EJB interfaces ?

Thanks for help
Ralph
[Message sent by forum member 'rsoika']

http://forums.java.net/jive/thread.jspa?messageID=398185