Skip to content

Commit

Permalink
support jdbc connection pools datavane/tis#366
Browse files Browse the repository at this point in the history
  • Loading branch information
baisui1981 committed Oct 7, 2024
1 parent 0ecf188 commit 6888328
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 78 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,9 @@
import com.qlangtech.tis.plugin.annotation.FormField;
import com.qlangtech.tis.plugin.annotation.FormFieldType;
import com.qlangtech.tis.plugin.annotation.Validator;
import com.qlangtech.tis.plugin.ds.JDBCConnection;
import com.qlangtech.tis.plugin.incr.IncrStreamFactory;
import com.qlangtech.tis.plugin.incr.WatchPodLog;
import com.qlangtech.tis.plugins.flink.client.JarSubmitFlinkRequest;
import com.qlangtech.tis.realtime.DefaultJDBCConnectionPool;
import com.qlangtech.tis.runtime.module.misc.IControlMsgHandler;
import com.qlangtech.tis.runtime.module.misc.IFieldErrorHandler;
import com.qlangtech.tis.trigger.jst.ILogListener;
Expand Down Expand Up @@ -173,8 +171,9 @@ public void checkUseable(TargetResName collection) {
@Override
public void deploy(TargetResName collection, ReplicasSpec incrSpec, long timestamp) throws JobOrchestrateException {

try (DefaultJDBCConnectionPool connectionPool = new DefaultJDBCConnectionPool()) {
JDBCConnection.connectionPool.set(connectionPool);
// try (DefaultJDBCConnectionPool connectionPool = new DefaultJDBCConnectionPool()) {
// JDBCConnection.connectionPool.set(connectionPool);
try {
File streamUberJar = UberJarUtil.createStreamUberJar(collection, timestamp);
this.deploy(collection, streamUberJar
, (request) -> {
Expand All @@ -185,7 +184,7 @@ public void deploy(TargetResName collection, ReplicasSpec incrSpec, long timesta
} catch (Exception e) {
throw new JobOrchestrateException(e);
} finally {
JDBCConnection.connectionPool.remove();
// JDBCConnection.connectionPool.remove();
}
}

Expand Down

0 comments on commit 6888328

Please sign in to comment.