Last I checked (6 months ago) HK2's bridge was almost unusable for
construction injection. I wouldn't consider this path.
Gili
On 10/09/2014 4:27 PM, jwtodd wrote:
thx gili!
i'll go w/ squarespace per your recommendation, given i have read a
bit about your perspectives on this challenge *and* your prior work in
this space.
fallback will be the hk2-guice-bridge
[ https://hk2.java.net/guice-bridge/ ]
q: thoughts re this route?
i'm actually optimistic about the squarespace path, knowing what i
know at present.
i'll follow up my findings here.
thx again!
best,
- james
On Tuesday, September 9, 2014 4:55:55 AM UTC-7, Gili wrote:
Hi James,
There is http://stackoverflow.com/a/25348422/14731
<http://stackoverflow.com/a/25348422/14731> but I have not tried
it myself. I originally invested a lot of time in trying to get
this to work but ended up with https://bitbucket.org/cowwoc/pouch/
<https://bitbucket.org/cowwoc/pouch/> because it was a better fit
for me. Pouch is like Dagger-lite, IoC without the automated code
generation... Surprisingly, this turned out to be rather trivial
to implement and all the debugging/configuring headaches totally
went away (I get sane stack-traces now). This also has a nice
side-effect of being very efficient at runtime.
Please let me know if you try out the Squarespace project. I am
especially interested in knowing whether it is possible to use
construction injection of HK2 types into Guice-injected types
(e.g. UriInfo into MyService) and vice versa (MyService into
Jersey-injected resource constructors).
Good luck,
Gili
On 09/09/2014 2:59 AM, jwtodd wrote:
hey gili, et al -
i'm a long time guice fan and have used a clean
jetty/jersey/jackson stack for years.
well, jersey2 is here and i am just now discovering these sticky
wicket issues.
on one hand, i am relieved in this thread as it expresses my
concerns/hopes perfectly.
on the other hand, i am bummed it is a dated thread yet surfaces
quite high in my google searches :|
i also found the hk2-guice bridge i plan to try out :
https://hk2.java.net/2.3.0-b03/guice-bridge.html
<https://hk2.java.net/2.3.0-b03/guice-bridge.html>
question: is this the optimal path forward, at this point in time?
again, i am really happy to find this thread and the individuals
participating, namely gili.
fully disclosure, one day i hope to try out dagger ... but that
is for another day and entirely bonus.
best,
- james
On Monday, October 28, 2013 4:29:11 PM UTC-7, Gili wrote:
The only way we're going to see this fixed is if Guice
users voice their opinion on the Jersey mailing list. Part of
the problem is that only 2-3 users have voiced their concerns
on the mailing list (in spite of the bug tracker showing
almost 20 votes). If the Jersey committers understand that
this is a high-priority concern that affects many users they
will prioritize accordingly.
The author of HK2 has been very helpful but I suspect
that the problem will need to be fixed in Jersey, not HK2,
and I haven't received a single response from the Jersey team.
Gili
On 28/10/2013 1:43 PM, Shane Witbeck wrote:
I've been struggling with this as well using the
guice-bridge. Looks like there's been some churning over
this topic:
http://markmail.org/message/k2jhr4y7uje6oijq#query:+page:1+mid:anfmm4jxnpoiqisd+state:results
<http://markmail.org/message/k2jhr4y7uje6oijq#query:+page:1+mid:anfmm4jxnpoiqisd+state:results>
On Sunday, October 27, 2013 7:57:23 AM UTC-7, Gili wrote:
On 25/09/2013 11:09 PM, cowwoc wrote:
> On 25/09/2013 9:45 PM, Marshall Pierce wrote:
>> On 09/25/2013 07:38 AM, Gili wrote:
>>> Hi,
>>>
>>> I authored Guice integration for Jersey 1.0 a few
years ago but times
>>> have changed and I no longer have as much free time
as I used to.
>>> Jersey
>>> 2.0 is out, with Spring support but Guice support is
nowhere in sight:
>>> https://java.net/jira/browse/JERSEY-1950
<https://java.net/jira/browse/JERSEY-1950>
>>>
>>> I tried applying pressure on the Jersey authors but
got no response at
>>> all. Is anyone able to help out by picking up this
issue and running
>>> with it? For everyone else, I would appreciate your
vote for this
>>> issue.
>>>
>>> Thank you,
>>> Gili
>>
>> I'm definitely interested in Guice support for Jersey
2. I don't have
>> a lot of free time, but I'm happy to help how I can.
The lack of
>> Guice support is one of the few issues preventing me
from adopting
>> Jersey 2.
>>
>> -Marshall
>>
> Hi Marshall,
>
>
> In theory we should be able to leverage
javax.inject.Inject to
> provide a consistent implementation for all compliant
injectors. In
> practice, it's not that simple. The devil in the
details is GuiceFilter.
>
> The problem is that HK2 requires us to construct a
> ServletContainer to get a ServiceLocator, then pass
that into the
> HK2-Guice bridge and get back an Injector. In the flip
side, Guice
> wants us to construct GuiceFilter to get an Injector,
and use it to
> inject ServletContainer. Each framework assumes it
comes first. It's
> not clear how they solved this problem for Spring, but
my guess is
> they don't have the equivalent of GuiceFilter.
>
> When I implemented Guice integration for Jersey
1.0, the first
> thing I did was examine the Spring implementation. I
suggest we begin
> by doing the same here. I'll try to take a look over
the next two
> days. Please try to do the same on your end.
>
> PS: The lack of Guice support is also one of the few
issues preventing
> me from adopting Jersey 2.
>
> Thanks,
> Gili
Hi Again,
So it turns out I don't have a working solution for
Guice <-> HK2
after all. Have you made any progress on your end?
Gili
--
You received this message because you are subscribed to a
topic in the Google Groups "google-guice" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/google-guice/Qrai0osMCzI/unsubscribe
<https://groups.google.com/d/topic/google-guice/Qrai0osMCzI/unsubscribe>.
To unsubscribe from this group and all its topics, send an
email to [email protected].
To post to this group, send email to [email protected].
Visit this group at
http://groups.google.com/group/google-guice
<http://groups.google.com/group/google-guice>.
For more options, visit
https://groups.google.com/groups/opt_out
<https://groups.google.com/groups/opt_out>.
--
You received this message because you are subscribed to a topic
in the Google Groups "google-guice" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/google-guice/Qrai0osMCzI/unsubscribe
<https://groups.google.com/d/topic/google-guice/Qrai0osMCzI/unsubscribe>.
To unsubscribe from this group and all its topics, send an email
to [email protected] <javascript:>.
To post to this group, send email to [email protected]
<javascript:>.
Visit this group at http://groups.google.com/group/google-guice
<http://groups.google.com/group/google-guice>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-guice/63dac086-9abc-44aa-ab40-1759497c2688%40googlegroups.com
<https://groups.google.com/d/msgid/google-guice/63dac086-9abc-44aa-ab40-1759497c2688%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to a topic in the
Google Groups "google-guice" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/google-guice/Qrai0osMCzI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
[email protected]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at http://groups.google.com/group/google-guice.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-guice/c6456c75-6ed9-4a6b-be12-8e56a5e402fa%40googlegroups.com
<https://groups.google.com/d/msgid/google-guice/c6456c75-6ed9-4a6b-be12-8e56a5e402fa%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-guice/5410CCC5.1080508%40bbs.darktech.org.
For more options, visit https://groups.google.com/d/optout.