Using Jersey-spring with Spring 4.0

jersey, jersey-2.0, spring

Solution

I have started using Jersey 2.7 and Spring 4.0.x recently in a project. I have setup a context hierarchy to inject beans, so far, I have discovered only one limitiation but that does not seem relate to Spring 4 but rather to the module itself or the HK2 Spring Bridge.

To give more insight about my use. I have a XJC/JAXB-backed which is consumed by a common service, repository and exposed through JAX-WS, and now hopefully through JAX-RS.

The multi-context stuff works now with `@Autowired`with `2.8-SNAPSHOT`. I have applied my changes and the `2.8-SNAPSHOT` to `2.7`. Here is the diff.

Edit (Michael-O; 2014-10-17): Here is a modified Spring module based off 2.11 with multi-context support.

Problem

According to you what are the risks of using `Spring 4` with the `jersey-spring3` integration module? I have tried to use Spring 4.0 with the jersey spring example and the example still works but i'm unable to identify risks linked to this usage.

Original source