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 2017/11/02 15:10:46 UTC

[camel] branch camel-2.19.x updated (c77f17b -> 8f821de)

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

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


    from c77f17b  Update SCM configuration with Gitbox URL
     new 8884cf0  clearing salesforce session when bayeux client receive 403 (https://issues.apache.org/jira/browse/CAMEL-11980)
     new 8f821de  Polished

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:
 .../salesforce/internal/streaming/SubscriptionHelper.java     | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
['"commits@camel.apache.org" <co...@camel.apache.org>'].

[camel] 01/02: clearing salesforce session when bayeux client receive 403 (https://issues.apache.org/jira/browse/CAMEL-11980)

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

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

commit 8884cf0205e8c0bf09cb913246371ab8e64f93c4
Author: Mabrouk Belhout <ma...@capgemini.com>
AuthorDate: Thu Nov 2 14:49:23 2017 +0100

    clearing salesforce session when bayeux client receive 403 (https://issues.apache.org/jira/browse/CAMEL-11980)
---
 .../salesforce/internal/streaming/SubscriptionHelper.java         | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java
index 7f21dae..d1b0b1d 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java
@@ -137,6 +137,14 @@ public class SubscriptionHelper extends ServiceSupport {
                                     LOG.error("Error renewing OAuth token on 401 error: " + e.getMessage(), e);
                                 }
                             }
+                            if (handshakeError.startsWith("403::")) {
+                                try {
+                                    LOG.info("Cleaning Session from SalesforceSession before restarting client");
+                                    session.logout();
+                                } catch (SalesforceException e) {
+                                    LOG.error("Error while cleaning session : " + e.getMessage(), e);
+                                }
+                            }
                         }
 
                         // restart if handshake fails for any reason

-- 
To stop receiving notification emails like this one, please contact
"commits@camel.apache.org" <co...@camel.apache.org>.

[camel] 02/02: Polished

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

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

commit 8f821debaed84bac25ff85c8190064c569af76c5
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Nov 2 16:09:38 2017 +0100

    Polished
---
 .../salesforce/internal/streaming/SubscriptionHelper.java          | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java
index d1b0b1d..85d5f71 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java
@@ -125,7 +125,6 @@ public class SubscriptionHelper extends ServiceSupport {
                         handshakeError = (String) message.get(ERROR_FIELD);
                         handshakeException = getFailure(message);
 
-
                         if (handshakeError != null) {
                             // refresh oauth token, if it's a 401 error
                             if (handshakeError.startsWith("401::")) {
@@ -134,15 +133,15 @@ public class SubscriptionHelper extends ServiceSupport {
                                     session.login(session.getAccessToken());
                                     LOG.info("Refreshed OAuth token for re-handshake");
                                 } catch (SalesforceException e) {
-                                    LOG.error("Error renewing OAuth token on 401 error: " + e.getMessage(), e);
+                                    LOG.warn("Error renewing OAuth token on 401 error: " + e.getMessage(), e);
                                 }
                             }
                             if (handshakeError.startsWith("403::")) {
                                 try {
-                                    LOG.info("Cleaning Session from SalesforceSession before restarting client");
+                                    LOG.info("Cleaning session (logout) from SalesforceSession before restarting client");
                                     session.logout();
                                 } catch (SalesforceException e) {
-                                    LOG.error("Error while cleaning session : " + e.getMessage(), e);
+                                    LOG.warn("Error while cleaning session: " + e.getMessage(), e);
                                 }
                             }
                         }

-- 
To stop receiving notification emails like this one, please contact
"commits@camel.apache.org" <co...@camel.apache.org>.