fix(agents): share runtimes across connection sessions
This commit is contained in:
1 parent
1280450b98
commit
67541232a2
67 files changed
+2904
-354
No files matched your search
@@ -8,7 +8,7 @@ import com.dbx.agent.ExecuteQueryOptions;
|
||||
import com.dbx.agent.ForeignKeyInfo;
|
||||
import com.dbx.agent.IndexInfo;
|
||||
import com.dbx.agent.JdbcExecutor;
|
||||
import com.dbx.agent.JsonRpcServer;
|
||||
import com.dbx.agent.MultiSessionJsonRpcServer;
|
||||
import com.dbx.agent.ObjectInfo;
|
||||
import com.dbx.agent.QueryResult;
|
||||
import com.dbx.agent.TableInfo;
|
||||
@@ -217,7 +217,7 @@ public final class AccessAgent extends BaseDatabaseAgent {
|
||||
|
||||
@Override
|
||||
public QueryResult executeQuery(String sql, String schema, ExecuteQueryOptions options) {
|
||||
return JdbcExecutor.INSTANCE.execute(
|
||||
return JdbcExecutor.current().execute(
|
||||
requireConnected(),
|
||||
sql,
|
||||
schema,
|
||||
@@ -225,7 +225,7 @@ public final class AccessAgent extends BaseDatabaseAgent {
|
||||
options.getMaxRows(),
|
||||
options.getFetchSize(),
|
||||
options.getTimeoutSecs(),
|
||||
JdbcExecutor.INSTANCE::defaultResultValue
|
||||
JdbcExecutor.current()::defaultResultValue
|
||||
);
|
||||
}
|
||||
|
||||
@@ -367,6 +367,6 @@ public final class AccessAgent extends BaseDatabaseAgent {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new JsonRpcServer(new AccessAgent()).run();
|
||||
new MultiSessionJsonRpcServer(AccessAgent::new).run();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user