Make SshScope accessors on a Singleton object.

SshScope used static methods to set the context, but the next
change will require the ThreadLocalRequestContext to be injected
in order to set the request scope. SshScope was updated to be
a Singleton injected into the required objects.

Change-Id: I20d4a7253edfa06f85af95e27980e4d6b4d160e2
This commit is contained in:
Colby Ranger
2012-05-09 10:17:55 -07:00
parent 928123f05e
commit b3a402124f
8 changed files with 39 additions and 26 deletions

View File

@@ -82,6 +82,7 @@ public class SshModule extends FactoryModule {
protected void configure() {
bindScope(RequestScoped.class, SshScope.REQUEST);
bind(RequestScopePropagator.class).to(SshScope.Propagator.class);
bind(SshScope.class).in(SINGLETON);
configureRequestScope();
configureCmdLineParser();