@@ -90,6 +90,7 @@ public class HaGatewayProviderModule
9090 private final GatewayBackendManager gatewayBackendManager ;
9191 private final QueryHistoryManager queryHistoryManager ;
9292 private final PathFilter pathFilter ;
93+ private final JdbcConnectionManager connectionManager ;
9394
9495 @ Override
9596 protected void configure ()
@@ -100,6 +101,7 @@ protected void configure()
100101 binder ().bind (QueryHistoryManager .class ).toInstance (queryHistoryManager );
101102 binder ().bind (BackendStateManager .class ).in (Scopes .SINGLETON );
102103 binder ().bind (PathFilter .class ).toInstance (pathFilter );
104+ binder ().bind (JdbcConnectionManager .class ).toInstance (connectionManager );
103105 }
104106
105107 public HaGatewayProviderModule (HaGatewayConfiguration configuration )
@@ -121,8 +123,8 @@ public HaGatewayProviderModule(HaGatewayConfiguration configuration)
121123 oAuth2GatewayCookieConfigurationPropertiesProvider .initialize (configuration .getOauth2GatewayCookieConfiguration ());
122124
123125 Jdbi jdbi = Jdbi .create (configuration .getDataStore ().getJdbcUrl (), configuration .getDataStore ().getUser (), configuration .getDataStore ().getPassword ());
124- JdbcConnectionManager connectionManager = new JdbcConnectionManager (jdbi , configuration .getDataStore ());
125- resourceGroupsManager = new HaResourceGroupsManager (connectionManager );
126+ this . connectionManager = new JdbcConnectionManager (jdbi , configuration .getDataStore ());
127+ resourceGroupsManager = new HaResourceGroupsManager (this . connectionManager );
126128 gatewayBackendManager = new HaGatewayManager (jdbi , configuration .getRouting ());
127129 queryHistoryManager = new HaQueryHistoryManager (jdbi , configuration .getDataStore ().getJdbcUrl ().startsWith ("jdbc:oracle" ));
128130 }
0 commit comments