users@jersey.java.net

[Jersey] Re: Jersey+Resin 4

From: Jakub Podlesak <jakub.podlesak_at_oracle.com>
Date: Wed, 01 Jun 2011 09:31:22 +0200

Hi Reza,

When starting a web application, Jersey tries to register
an EJB interceptor (look at the com.sun.jersey.server.impl.ejb
package, the class names are self descriptive).

The EJBComponentProviderFactoryInitilizer.inititialize method
however uses a GlassFish specific way to obtain the EJB interceptor
binder. That is the part which i guess works in a different way in Resin.
If you switch the config level logs on, you should be getting:

"The EJB interceptor binding API is not available. JAX-RS EJB support is
disabled."

in your log file.

I think we should abstract this logic out, and make it pluggable, so that
you could implement your own Resin specific interceptor.

Would you be able to try tweak the above code just to test
if you can make the JAX-RS/EJB integration work in Resin
by updating the interceptor binding logic and maybe share the patch?
I can then try to introduce the pluggable point for this.

For injecting EJBs into JAX-RS artifacts, you may want to see
EJBComponentProviderFactory
at the same package. I guess that should work as is. If not, please let
me know.

Thanks,

~Jakub


On 06/01/2011 01:08 AM, Reza Rahman wrote:
> Hi,
>
> As you guys might know, Resin 4 just got certified for the Java EE 6 Web
> Profile. Although we do not currently support JAX-RS since it is not
> included in the Web Profile, a lot of our customers request JAX-RS. As a
> result, we would like to recommend Jersey as a pluggable JAX-RS solution
> for Resin.
>
> I tested Jersey out and so far things look pretty good. It was
> especially cool that CDI integration just worked out of the box. The
> issue I have now is that the EJB integration does not seem to work as
> smoothly. What do I need to do to make the JAX-RS/EJB integration happen
> on Resin 4? In particular, I'd like to have Resin EJBs recognized as
> Jersey/JAX-RS resources.
>
> Thanks,
> Reza
>
>