DBZ-4078 Making sure base lifecycle hook is called

This commit is contained in:
Gunnar Morling 2021-10-04 10:09:51 +02:00
parent 82dad32e2a
commit 477efc4033

View File

@ -47,6 +47,8 @@ protected String getSignalTableName(String dataCollectionId) {
@Override
protected void preReadChunk(IncrementalSnapshotContext<TableId> context) {
super.preReadChunk(context);
if (pdbName != null) {
connection.setSessionToPdb(pdbName);
}
@ -54,6 +56,8 @@ protected void preReadChunk(IncrementalSnapshotContext<TableId> context) {
@Override
protected void postReadChunk(IncrementalSnapshotContext<TableId> context) {
super.postReadChunk(context);
if (pdbName != null) {
connection.resetSessionToCdb();
}
@ -61,6 +65,8 @@ protected void postReadChunk(IncrementalSnapshotContext<TableId> context) {
@Override
protected void postIncrementalSnapshotCompleted() {
super.postIncrementalSnapshotCompleted();
try {
connection.close();
}