diff --git a/src/main/java/com/aerospike/jdbc/AerospikeConnection.java b/src/main/java/com/aerospike/jdbc/AerospikeConnection.java index 912f9ef..a250003 100644 --- a/src/main/java/com/aerospike/jdbc/AerospikeConnection.java +++ b/src/main/java/com/aerospike/jdbc/AerospikeConnection.java @@ -94,6 +94,7 @@ public void rollback() throws SQLException { @Override public void close() { + logger.info(() -> "Close AerospikeConnection"); client.close(); closed = true; } diff --git a/src/main/java/com/aerospike/jdbc/async/RecordSetBatchSequenceListener.java b/src/main/java/com/aerospike/jdbc/async/RecordSetBatchSequenceListener.java index 8db42ae..48f594c 100644 --- a/src/main/java/com/aerospike/jdbc/async/RecordSetBatchSequenceListener.java +++ b/src/main/java/com/aerospike/jdbc/async/RecordSetBatchSequenceListener.java @@ -6,6 +6,7 @@ import com.aerospike.client.query.KeyRecord; import com.aerospike.jdbc.model.DriverPolicy; +import java.util.logging.Level; import java.util.logging.Logger; public class RecordSetBatchSequenceListener implements BatchSequenceListener { @@ -35,7 +36,7 @@ public void onSuccess() { @Override public void onFailure(AerospikeException e) { - logger.warning(e::getMessage); + logger.log(Level.SEVERE, "Aerospike listener failure", e); recordSet.abort(); } diff --git a/src/main/java/com/aerospike/jdbc/async/RecordSetRecordSequenceListener.java b/src/main/java/com/aerospike/jdbc/async/RecordSetRecordSequenceListener.java index f78f347..c05bddd 100644 --- a/src/main/java/com/aerospike/jdbc/async/RecordSetRecordSequenceListener.java +++ b/src/main/java/com/aerospike/jdbc/async/RecordSetRecordSequenceListener.java @@ -3,10 +3,12 @@ import com.aerospike.client.AerospikeException; import com.aerospike.client.Key; import com.aerospike.client.Record; +import com.aerospike.client.ResultCode; import com.aerospike.client.listener.RecordSequenceListener; import com.aerospike.client.query.KeyRecord; import com.aerospike.jdbc.model.DriverPolicy; +import java.util.logging.Level; import java.util.logging.Logger; public class RecordSetRecordSequenceListener implements RecordSequenceListener { @@ -34,7 +36,11 @@ public void onSuccess() { @Override public void onFailure(AerospikeException exception) { - logger.warning(exception::getMessage); + if (exception.getResultCode() == ResultCode.QUERY_TERMINATED) { + logger.warning(exception::getMessage); + } else { + logger.log(Level.SEVERE, "Aerospike listener failure", exception); + } recordSet.abort(); }