You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ds...@apache.org on 2019/02/01 19:49:53 UTC

[geode] branch feature/GEODE-6291 updated: JdbcAsyncWriter now handles exceptions from initialization

This is an automated email from the ASF dual-hosted git repository.

dschneider pushed a commit to branch feature/GEODE-6291
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/feature/GEODE-6291 by this push:
     new 33d4a1a  JdbcAsyncWriter now handles exceptions from initialization
33d4a1a is described below

commit 33d4a1ae30534ed41b27f9cda1c26aeef1243eb0
Author: Darrel Schneider <ds...@pivotal.io>
AuthorDate: Fri Feb 1 11:49:12 2019 -0800

    JdbcAsyncWriter now handles exceptions from initialization
---
 .../java/org/apache/geode/connectors/jdbc/JdbcAsyncWriter.java    | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/JdbcAsyncWriter.java b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/JdbcAsyncWriter.java
index 2668606..dc746f7 100644
--- a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/JdbcAsyncWriter.java
+++ b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/JdbcAsyncWriter.java
@@ -59,7 +59,13 @@ public class JdbcAsyncWriter extends AbstractJdbcCallback implements AsyncEventL
     changeTotalEvents(events.size());
 
     if (!events.isEmpty()) {
-      checkInitialized(events.get(0).getRegion());
+      try {
+        checkInitialized(events.get(0).getRegion());
+      } catch (RuntimeException ex) {
+        changeFailedEvents(events.size());
+        logger.error("Exception initializing JdbcAsyncWriter", ex);
+        return true;
+      }
     }
 
     Boolean initialPdxReadSerialized = cache.getPdxReadSerializedOverride();