Marek,
On 05/11/2013 3:47 PM, Marek Potociar wrote:
> Hello Gili,
>
> Trying to get the community organized and involved in contributing improvements to Guice and Spring support in HK2 and Jersey 2 is the right step. Please feel free to contribute any new features and/or improvements to current support.
Sorry, but I believe we're beyond this point. We (those of us who
want to use Guice and Spring) have pretty much established that the
Jersey 2.0's design prevents us from using Guice and Spring. The only
way we will solve this problem is through open dialogue (on the mailing
list or online chat). The very first thing we need to establish is what
to do on a design level. Creating push requests beforehand is a waste of
everyone's time.
On 05/11/2013 3:47 PM, Marek Potociar wrote:
> P.S. As much as I understand why people using Spring and Guice are upset about this, I still do not think it was a mistake to release Jersey 2 without a Spring and Guice support. Jersey now provides JSR-330 injection (via HK2) without any need for Spring or Guice.
I don't understand. Both Guice and Spring implement JSR-330. What do
Jersey users gain by the forced use of HK2 as the sole DI implementation?
> Also, support for Spring and Guice was not the primary release or feature driver for Jersey. JAX-RS 2.0 support and releasing JAX-RS 2.0 RI was the primary motivation for the earliest possible release.
I totally agree. What I disagree with is JAX-RS (and Jersey more
specifically) mandating specific DI behavior. I argue that JAX-RS should
not discuss DI at all. Jersey should provide building blocks needed by
DI integrators so that end-users can use HK2, Guice, Spring, or whatever
else they wish without having to learn yet another DI framework.
Gili