javaee / jersey

This is no longer the active Jersey repository. Please see the README.md
http://jersey.github.io
Other
2.86k stars 2.35k forks source link

Guice injection manager #3692

Open tareksha opened 7 years ago

tareksha commented 7 years ago

Hi,

Is an official Guice-based InjectionManager implementation planned?

I am trying to investigate the current situation before contributing an InjectionManager implementation that is based on Guice, just to make sure we do not end up having two overlapping implementations.

thank you

salebab commented 7 years ago

I'm also interested to contribute and I already started to play with it. It's really in early phase, so just few concepts, and it's not working at all. Here is my fork. Since research here is very time consuming, having some guides or approaching thoughts from Jersey contributors would be very helpful.

tareksha commented 7 years ago

@jellsen I have only an initial code, still not uploaded to GitHub. Jersey's maintainers position is understandable for now given Jersey works with hk2 and this is only an SPI extension to allow other alternatives.

@salebab good to know! I'll see if we can cooperate on this.

salebab commented 7 years ago

I've made some progress, but unfortunately it's still not working well. I've copied some of jersey-hk2 unit tests and they are passing. But the main problem is Context Resolver, and probably it's most complicated thing here. I think it can be solved with Guice's CustomInjections, but will check that. Too bad that context resolver is not fully covered by unit tests, it would be a bit easier.

Here are commits, any code review and suggestions are welcome - https://github.com/salebab/jersey/commits/guice