Update the ThreadLocal based scopes to use RequestContext.
Bound the ThreadLocalRequestContext module, which makes the CurrentUser available in the Global module. Removed any binding in the scopes that provided the CurrentUser. Updated all of the scopes to propagate the RequestContext. The PerThreadRequestScope.Propagator allows scoping callables to enter a request context. Change-Id: Idf682ed1d7485cf8c9cdd22cd89bfe1ad5296880
This commit is contained in:
@@ -152,11 +152,6 @@ public class SshModule extends FactoryModule {
|
||||
bind(SocketAddress.class).annotatedWith(RemotePeer.class).toProvider(
|
||||
SshRemotePeerProvider.class).in(SshScope.REQUEST);
|
||||
|
||||
bind(CurrentUser.class).toProvider(SshCurrentUserProvider.class).in(
|
||||
SshScope.REQUEST);
|
||||
bind(IdentifiedUser.class).toProvider(SshIdentifiedUserProvider.class).in(
|
||||
SshScope.REQUEST);
|
||||
|
||||
bind(WorkQueue.Executor.class).annotatedWith(CommandExecutor.class)
|
||||
.toProvider(CommandExecutorProvider.class).in(SshScope.REQUEST);
|
||||
|
||||
|
Reference in New Issue
Block a user