Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoConfig not honouring Guice Singleton annotation on resource classes #96

Open
pratikkumar19 opened this issue Oct 20, 2016 · 1 comment

Comments

@pratikkumar19
Copy link

Whenever a Jersey resource class is annotated with @singleton (guice annotation) hk2 doesnot honour it as it searches java's @singleton annotation. This is solved by using java's Singleton annotation but without a proper warning or documentation provided this issue might go unsolved.

In my case this resulted in in-memory caches being intialised for every request as hk2 doesnot honour Guice annotation.
Atleast a fair warning in javadocs or github documentation might help the developer.

@PeterWippermann
Copy link

  1. Could you please extend your issue description by the fully-qualified names of the Singleton annoations you refer to?
  2. This is a library to glue Dropwizard and Guice. Why should it keep HK2 (which is an alternative to Guice) in mind?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants