users@jersey.java.net

[Jersey] Re: Regsitering singletons

From: Laird Nelson <ljnelson_at_gmail.com>
Date: Wed, 09 Mar 2016 21:54:49 +0000

On Wed, Mar 9, 2016 at 1:26 PM ax487 <ax487_at_gmx.de> wrote:

> Well, I tried that. I don't really have contracts (interfaces) though.
>

Then register(Object) is the one you want. I have no idea why it's not
working. It works for me!

What does your injection point look like? I'm assuming it's utterly
trivial and looks like this:

public class ResourceExample {
  @Inject
  private SingletonExample singleton;
 /* ... */
}

Best,
Laird