You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2018/01/22 15:10:11 UTC

[camel] branch master updated (617f550 -> cffa96f)

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

davsclaus pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 617f550  CAMEL-12175 - Regen docs
     new b30704c  Exposed accessors for property 'clearString'
     new cffa96f  Configurable sql props: decouple from private field through accessor usage

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../idempotent/jdbc/JdbcMessageIdRepository.java   | 26 ++++++++++++++--------
 1 file changed, 17 insertions(+), 9 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
davsclaus@apache.org.

[camel] 01/02: Exposed accessors for property 'clearString'

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit b30704c19cc81fc47a5a0ea0b294fa7bb412ece9
Author: Davide Cavestro <da...@gmail.com>
AuthorDate: Sat Jan 20 11:07:06 2018 +0100

    Exposed accessors for property 'clearString'
---
 .../processor/idempotent/jdbc/JdbcMessageIdRepository.java     | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/components/camel-sql/src/main/java/org/apache/camel/processor/idempotent/jdbc/JdbcMessageIdRepository.java b/components/camel-sql/src/main/java/org/apache/camel/processor/idempotent/jdbc/JdbcMessageIdRepository.java
index b7bf688..ccedaa0 100644
--- a/components/camel-sql/src/main/java/org/apache/camel/processor/idempotent/jdbc/JdbcMessageIdRepository.java
+++ b/components/camel-sql/src/main/java/org/apache/camel/processor/idempotent/jdbc/JdbcMessageIdRepository.java
@@ -152,4 +152,12 @@ public class JdbcMessageIdRepository extends AbstractJdbcMessageIdRepository<Str
     public void setDeleteString(String deleteString) {
         this.deleteString = deleteString;
     }
-}
\ No newline at end of file
+
+    public String getClearString() {
+        return clearString;
+    }
+
+    public void setClearString(String clearString) {
+        this.clearString = clearString;
+    }
+}

-- 
To stop receiving notification emails like this one, please contact
davsclaus@apache.org.

[camel] 02/02: Configurable sql props: decouple from private field through accessor usage

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit cffa96f92d964ef389c5471c1f3fd35fa96cecdb
Author: Davide Cavestro <da...@gmail.com>
AuthorDate: Sat Jan 20 11:13:06 2018 +0100

    Configurable sql props: decouple from private field through accessor usage
---
 .../idempotent/jdbc/JdbcMessageIdRepository.java         | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/components/camel-sql/src/main/java/org/apache/camel/processor/idempotent/jdbc/JdbcMessageIdRepository.java b/components/camel-sql/src/main/java/org/apache/camel/processor/idempotent/jdbc/JdbcMessageIdRepository.java
index ccedaa0..e2a8a20 100644
--- a/components/camel-sql/src/main/java/org/apache/camel/processor/idempotent/jdbc/JdbcMessageIdRepository.java
+++ b/components/camel-sql/src/main/java/org/apache/camel/processor/idempotent/jdbc/JdbcMessageIdRepository.java
@@ -61,18 +61,18 @@ public class JdbcMessageIdRepository extends AbstractJdbcMessageIdRepository<Str
             public Boolean doInTransaction(TransactionStatus status) {
                 try {
                     // we will receive an exception if the table doesn't exists or we cannot access it
-                    jdbcTemplate.execute(tableExistsString);
+                    jdbcTemplate.execute(getTableExistsString());
                     log.debug("Expected table for JdbcMessageIdRepository exist");
                 } catch (DataAccessException e) {
                     if (createTableIfNotExists) {
                         try {
                             log.debug("creating table for JdbcMessageIdRepository because it doesn't exist...");
-                            jdbcTemplate.execute(createString);
-                            log.info("table created with query '{}'", createString);
+                            jdbcTemplate.execute(getCreateString());
+                            log.info("table created with query '{}'", getCreateString());
                         } catch (DataAccessException dae) {
                             // we will fail if we cannot create it
                             log.error("Can't create table for JdbcMessageIdRepository with query '{}' because of: {}. This may be a permissions problem. Please create this table and try again.",
-                                    createString, e.getMessage());
+                                    getCreateString(), e.getMessage());
                             throw dae;
                         }
                     } else {
@@ -87,22 +87,22 @@ public class JdbcMessageIdRepository extends AbstractJdbcMessageIdRepository<Str
 
     @Override
     protected int queryForInt(String key) {
-        return jdbcTemplate.queryForObject(queryString, Integer.class, processorName, key);
+        return jdbcTemplate.queryForObject(getQueryString(), Integer.class, processorName, key);
     }
 
     @Override
     protected int insert(String key) {
-        return jdbcTemplate.update(insertString, processorName, key, new Timestamp(System.currentTimeMillis()));
+        return jdbcTemplate.update(getInsertString(), processorName, key, new Timestamp(System.currentTimeMillis()));
     }
 
     @Override
     protected int delete(String key) {
-        return jdbcTemplate.update(deleteString, processorName, key);
+        return jdbcTemplate.update(getDeleteString(), processorName, key);
     }
     
     @Override
     protected int delete() {
-        return jdbcTemplate.update(clearString, processorName);
+        return jdbcTemplate.update(getClearString(), processorName);
     }
 
     public boolean isCreateTableIfNotExists() {

-- 
To stop receiving notification emails like this one, please contact
davsclaus@apache.org.