When binding a singleton scoped class within an AbstractBinder, I notice that I always have to chain .in(Singleton.class) to every binding, regardless of if my class has @Singleton at the class level. Does HK2 actually pay attention to the singleton binding on the class? Or is this a bug?
….
bindAsContract(SingleUseTokenCache.class).in(Singleton.class); //i wish this didnt need the latter
….
@Singleton
public class SingleUseTokenCache {
….
Just some clarification would be much appreciated as it makes the configuration look muddier than it needs to be.
Zack