fix(gbase8s): stabilize connections and table access
Co-authored-by: zipg <4047349+zipg@users.noreply.github.com>
This commit is contained in:
1 parent
7d5a9459e4
commit
7e6923d53b
26 files changed
+375
-46
No files matched your search
@@ -270,6 +270,10 @@ public abstract class AbstractJdbcAgent extends BaseDatabaseAgent {
|
||||
poolRegistry = registry;
|
||||
}
|
||||
|
||||
public boolean supportsConnectionPooling() {
|
||||
return true;
|
||||
}
|
||||
|
||||
final synchronized boolean usesConnectionPool() {
|
||||
return poolRegistry != null;
|
||||
}
|
||||
@@ -531,7 +535,7 @@ public abstract class AbstractJdbcAgent extends BaseDatabaseAgent {
|
||||
return this::resultValue;
|
||||
}
|
||||
|
||||
private Connection openInitializedConnection(ConnectParams params) throws Exception {
|
||||
protected final Connection openInitializedConnection(ConnectParams params) throws Exception {
|
||||
Connection opened = openConnection(params);
|
||||
try {
|
||||
afterPhysicalConnect(params, opened);
|
||||
|
||||
@@ -181,7 +181,9 @@ public final class MultiSessionJsonRpcServer implements AutoCloseable {
|
||||
session = new Session(sessionHandlerFactory.get());
|
||||
} else {
|
||||
DatabaseAgent agent = agentFactory.get();
|
||||
if (poolRegistry.isEnabled() && agent instanceof AbstractJdbcAgent jdbcAgent) {
|
||||
if (poolRegistry.isEnabled()
|
||||
&& agent instanceof AbstractJdbcAgent jdbcAgent
|
||||
&& jdbcAgent.supportsConnectionPooling()) {
|
||||
jdbcAgent.attachConnectionPoolRegistry(poolRegistry);
|
||||
ensureMaintenanceStarted();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user