users@jersey.java.net

[Jersey] Re: Spring framework support for Jersey 2

From: miroslav fuksa <miroslav.fuksa_at_oracle.com>
Date: Thu, 02 May 2013 15:29:15 +0200

Hi Marko,

thanks for you pull request.

There is a problem build with the pull request, please see:
https://buildhive.cloudbees.com/job/jersey/job/jersey/44/.

In order to contribute to Jersey you need to sign the OCA (Oracle
contributor agreement). Please follow instructions here:
http://www.oracle.com/technetwork/community/oca-486395.html


Yes, we would like to keep the Spring integration code in the Jersey 2
code base.

Jersey 1 contained a Spring integration. There are tests which needs to
be migrated to Jersey 2. So, in order to have spring integration
in Jersey 2 these tests should be migrated.

You can find them in <Jersey 1 sources>/contribs/spring
and there is a sample: <Jersey 1 sources>/samples/spring-annotations

We have not investigated your solutions into details but we see one
problem from the first check. The spring integration should work two
ways, which means we should be able to inject Spring beans but also
Spring should be able to inject our injections. The pull request
currently solves only the first case.

So, in order to finish this contribution, you would basically need to
migrate all the related tests from Jersey 1 to Jersey 2 and make them
working. This will probably reveal all the problems that need to be
fixed in the jersey-spring integration module. Also we need to make sure
that two way integration works well.

Such a contribution would be of course a good feature for Jersey 2 and
we would appreciate such a help.

Thanks
Mira


On 2.5.2013 12:42, Marko Asplund wrote:
> Hi,
>
> I've created a Spring integration module prototype for Jersey 2.
> The module allows injecting Spring beans in JAX-RS resource classes
> (running in Servlet 3.0 context).
> There's also a sample web application for demonstrating the Spring
> integration module.
> I've tested the integration module and sample app with Tomcat 7 and it
> seems to be working correctly.
>
> I'd like to request feedback from Jersey developers on the design and
> implementation approach.
> I'm also interested in hearing whether the module could be included in
> Jersey 2 in some form in the future or if it should be kept separate
> from Jersey code base.
>
> The integration module and sample app can be found on GitHub:
> https://github.com/marko-asplund/jersey/tree/master/ext/jersey-spring
> https://github.com/marko-asplund/jersey/tree/master/examples/helloworld-spring
>
>
> thanks,
>
> marko