Skip to content

Commit

Permalink
Inject SessionPropertyManager in DispatchManager
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasz-stec authored and losipiuk committed Jul 7, 2021
1 parent 90c22f6 commit 9d090a5
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public class DispatchManager
private final AccessControl accessControl;
private final SessionSupplier sessionSupplier;
private final SessionPropertyDefaults sessionPropertyDefaults;
private final SessionPropertyManager sessionPropertyManager;

private final int maxQueryLength;

Expand All @@ -89,6 +90,7 @@ public DispatchManager(
AccessControl accessControl,
SessionSupplier sessionSupplier,
SessionPropertyDefaults sessionPropertyDefaults,
SessionPropertyManager sessionPropertyManager,
QueryManagerConfig queryManagerConfig,
DispatchExecutor dispatchExecutor)
{
Expand All @@ -101,6 +103,7 @@ public DispatchManager(
this.accessControl = requireNonNull(accessControl, "accessControl is null");
this.sessionSupplier = requireNonNull(sessionSupplier, "sessionSupplier is null");
this.sessionPropertyDefaults = requireNonNull(sessionPropertyDefaults, "sessionPropertyDefaults is null");
this.sessionPropertyManager = sessionPropertyManager;

requireNonNull(queryManagerConfig, "queryManagerConfig is null");
this.maxQueryLength = queryManagerConfig.getMaxQueryLength();
Expand Down Expand Up @@ -219,7 +222,7 @@ private <C> void createQueryInternal(QueryId queryId, Slug slug, SessionContext
catch (Throwable throwable) {
// creation must never fail, so register a failed query in this case
if (session == null) {
session = Session.builder(new SessionPropertyManager())
session = Session.builder(sessionPropertyManager)
.setQueryId(queryId)
.setIdentity(sessionContext.getIdentity())
.setSource(sessionContext.getSource())
Expand Down

0 comments on commit 9d090a5

Please sign in to comment.