Skip to content
Advertisement

Tag: hk2

Two implementations of one interface in Jersey/HK2, reuse first in other

I have an interface with a naive implementation, say I want to make a cache that caches the doIt, so I wrote a wrapper : Then, I add both implementations to my Binder: I get errors complaining about: org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for injection at SystemInjecteeImpl(requiredType=MyService,parent=CachingMyService},position=-1,optional=false,self=false,unqualified=null,1102650897) I trief using Qualitifaction like this: And using that: But that does

Advertisement