users@hk2.java.net

Dynamically Binding an Instance

From: buko <buko_at_chiubarobot.com>
Date: Wed, 31 Jul 2013 23:12:35 -0400

Once a client logs in to a remote system a 'Client' object is created
representing that authenticated connection. I'd like to dynamically bind
this remote connection into the ServiceLocator so it can be injected
elsewhere.

(1) How to dynamically bind an instance? Looking at BuildHelper and
DescriptorImpl it seems they don't support dynamically binding instance?

(2) Do I need to create a new scope? If so, is there a clear, uptodate
example? Seems the docs on the wiki about custom scopes are out of date.

Thanks