[jira] [Commented] (CAMEL-8799) Make it possible for JsonPath to suppress PathNotFoundException

2018-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-8799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16319843#comment-16319843
 ] 

ASF GitHub Bot commented on CAMEL-8799:
---

davsclaus commented on a change in pull request #528: CAMEL-8799: Make 
json-path suppress PathNotFoundExceptions by default
URL: https://github.com/apache/camel/pull/528#discussion_r160608232
 
 

 ##
 File path: 
components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JsonPathEngine.java
 ##
 @@ -38,7 +41,8 @@
 private final Configuration configuration;
 
 public JsonPathEngine(String expression) {
-this.configuration = Configuration.defaultConfiguration();
+Defaults defaults = DefaultsImpl.INSTANCE;
 
 Review comment:
   @yihtserns you are welcome to provide a PR to fix this


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Make it possible for JsonPath to suppress PathNotFoundException
> ---
>
> Key: CAMEL-8799
> URL: https://issues.apache.org/jira/browse/CAMEL-8799
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-jsonpath
>Affects Versions: 2.15.2
>Reporter: Preben Asmussen
>Assignee: Claus Ibsen
> Fix For: 2.16.0
>
>
> It should be possible to suppress exceptions when evaluating JsonPath's.
> See 
> http://camel.465427.n5.nabble.com/How-to-suppress-exceptions-from-Jsonpath-expressions-td5767384.html
> There are 2 options
> 1.  Make it the default behaviour, so a null value will be returned instead 
> of throwing an PathNotFoundException when evaluating json path expressions 
> and the path is not found. I have a working patch for that here 
> https://github.com/pax95/camel/commit/e09bd00d9199c88787f0acb0d2ea8c86e6a1bba9
>  that I can do a PR on.
> 2. Make it configurable on the JsonPath component so you can enable/disable 
> it on demand. This would also make it possible to expose other options from 
> com.jayway.jsonpath.Option if they make sense. More work is require to make 
> it available as both xml and java dsl.
> Currently I'm at bit overloaded to do a PR on 2 if that is the preferred 
> option, so if any want to take over It will be fine.
> If option 1 is ok I'll create a PR.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (CAMEL-12133) Update Camel documentation for ThrottlingExceptionRoutePolicy

2018-01-09 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-12133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-12133:

Component/s: (was: camel-core)
 documentation

> Update Camel documentation for ThrottlingExceptionRoutePolicy 
> --
>
> Key: CAMEL-12133
> URL: https://issues.apache.org/jira/browse/CAMEL-12133
> Project: Camel
>  Issue Type: Task
>  Components: documentation
>Reporter: Mike Barlotta
>Priority: Minor
>
> The `ThrottlingExceptionPolicy` circuit breaker EIP needs some documentation 
> Perhaps on the Route Policy page but open to suggestions
> http://camel.apache.org/routepolicy.html



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (CAMEL-12133) Update Camel documentation for ThrottlingExceptionRoutePolicy

2018-01-09 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-12133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-12133:

Issue Type: Task  (was: Bug)

> Update Camel documentation for ThrottlingExceptionRoutePolicy 
> --
>
> Key: CAMEL-12133
> URL: https://issues.apache.org/jira/browse/CAMEL-12133
> Project: Camel
>  Issue Type: Task
>  Components: documentation
>Reporter: Mike Barlotta
>Priority: Minor
>
> The `ThrottlingExceptionPolicy` circuit breaker EIP needs some documentation 
> Perhaps on the Route Policy page but open to suggestions
> http://camel.apache.org/routepolicy.html



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (CAMEL-12133) Update Camel documentation for ThrottlingExceptionRoutePolicy

2018-01-09 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-12133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-12133:

Affects Version/s: (was: 2.19.0)

> Update Camel documentation for ThrottlingExceptionRoutePolicy 
> --
>
> Key: CAMEL-12133
> URL: https://issues.apache.org/jira/browse/CAMEL-12133
> Project: Camel
>  Issue Type: Task
>  Components: documentation
>Reporter: Mike Barlotta
>Priority: Minor
>
> The `ThrottlingExceptionPolicy` circuit breaker EIP needs some documentation 
> Perhaps on the Route Policy page but open to suggestions
> http://camel.apache.org/routepolicy.html



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-12119) allow override of smtp recipients

2018-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16319835#comment-16319835
 ] 

ASF GitHub Bot commented on CAMEL-12119:


davsclaus commented on issue #2172: fix for 
https://issues.apache.org/jira/browse/CAMEL-12119 [CAMEL-12119]
URL: https://github.com/apache/camel/pull/2172#issuecomment-356523971
 
 
   Yes we need an option on the mail component / endpoint to explicit turn this 
on, so it behaves as-is today. Naming such an option can be a bit harder - 
'recipientXHeaderOverride' or something


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> allow override of smtp recipients
> -
>
> Key: CAMEL-12119
> URL: https://issues.apache.org/jira/browse/CAMEL-12119
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-mail
>Affects Versions: 2.20.1
>Reporter: Simon IJskes
>Priority: Minor
> Attachments: new.txt
>
>
> Currently there is no way to override recipients for a SMTP email.
> In order to forward an email to a secundairy address not specified in the 
> content-addressing, aka 'a redirect', a header called 'X-recipient' could be 
> used to override the recipients of the email.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-12115) Camel-Consul: Upgrade to 1.0.0 consul client

2018-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16319795#comment-16319795
 ] 

ASF GitHub Bot commented on CAMEL-12115:


oscerd commented on issue #2166:  "CAMEL-12115:Camel-Consul: Upgrade to 1.0.0 
consul client"
URL: https://github.com/apache/camel/pull/2166#issuecomment-356517839
 
 
   @ramu11 won't work on this anymore, so if someone got cycle to take a look 
and want to start from this PR I'll leave this one open.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Camel-Consul: Upgrade to 1.0.0 consul client
> 
>
> Key: CAMEL-12115
> URL: https://issues.apache.org/jira/browse/CAMEL-12115
> Project: Camel
>  Issue Type: Task
>  Components: camel-consul
>Reporter: Andrea Cosentino
>Assignee: Andrea Cosentino
> Fix For: 2.21.0
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-12119) allow override of smtp recipients

2018-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16319731#comment-16319731
 ] 

ASF GitHub Bot commented on CAMEL-12119:


onders86 commented on issue #2172: fix for 
https://issues.apache.org/jira/browse/CAMEL-12119 [CAMEL-12119]
URL: https://github.com/apache/camel/pull/2172#issuecomment-356507710
 
 
   I guess the PR will be acceptable if you can modify as per requested..


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> allow override of smtp recipients
> -
>
> Key: CAMEL-12119
> URL: https://issues.apache.org/jira/browse/CAMEL-12119
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-mail
>Affects Versions: 2.20.1
>Reporter: Simon IJskes
>Priority: Minor
> Attachments: new.txt
>
>
> Currently there is no way to override recipients for a SMTP email.
> In order to forward an email to a secundairy address not specified in the 
> content-addressing, aka 'a redirect', a header called 'X-recipient' could be 
> used to override the recipients of the email.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-12119) allow override of smtp recipients

2018-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16319111#comment-16319111
 ] 

ASF GitHub Bot commented on CAMEL-12119:


sijskes closed pull request #2172: fix for 
https://issues.apache.org/jira/browse/CAMEL-12119 [CAMEL-12119]
URL: https://github.com/apache/camel/pull/2172
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/components/camel-mail/src/main/java/org/apache/camel/component/mail/DefaultJavaMailSender.java
 
b/components/camel-mail/src/main/java/org/apache/camel/component/mail/DefaultJavaMailSender.java
index 9198ef1f5d4..c73eb530026 100644
--- 
a/components/camel-mail/src/main/java/org/apache/camel/component/mail/DefaultJavaMailSender.java
+++ 
b/components/camel-mail/src/main/java/org/apache/camel/component/mail/DefaultJavaMailSender.java
@@ -22,8 +22,8 @@
 import javax.mail.NoSuchProviderException;
 import javax.mail.Session;
 import javax.mail.Transport;
+import javax.mail.internet.InternetAddress;
 import javax.mail.internet.MimeMessage;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -121,7 +121,18 @@ public void send(MimeMessage mimeMessage) throws 
MessagingException {
 mimeMessage.setHeader("Message-ID", messageId);
 }
 LOG.debug("Sending MimeMessage: {} using host: {}", mimeMessage, 
host);
-transport.sendMessage(mimeMessage, mimeMessage.getAllRecipients());
+
+String[] recipients = mimeMessage.getHeader( "X-Recipient" );
+
+if( recipients == null || recipients.length == 0 ) {
+transport.sendMessage( mimeMessage, 
mimeMessage.getAllRecipients() );
+} else {
+InternetAddress ra[] = new InternetAddress[recipients.length];
+for( int i = 0; i < recipients.length; i++ ) {
+ra[i] = new InternetAddress( recipients[i], true );
+}
+transport.sendMessage( mimeMessage, ra );
+}
 } finally {
 try {
 transport.close();


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> allow override of smtp recipients
> -
>
> Key: CAMEL-12119
> URL: https://issues.apache.org/jira/browse/CAMEL-12119
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-mail
>Affects Versions: 2.20.1
>Reporter: Simon IJskes
>Priority: Minor
> Attachments: new.txt
>
>
> Currently there is no way to override recipients for a SMTP email.
> In order to forward an email to a secundairy address not specified in the 
> content-addressing, aka 'a redirect', a header called 'X-recipient' could be 
> used to override the recipients of the email.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-12119) allow override of smtp recipients

2018-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16319112#comment-16319112
 ] 

ASF GitHub Bot commented on CAMEL-12119:


Github user sijskes closed the pull request at:

https://github.com/apache/camel/pull/2172


> allow override of smtp recipients
> -
>
> Key: CAMEL-12119
> URL: https://issues.apache.org/jira/browse/CAMEL-12119
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-mail
>Affects Versions: 2.20.1
>Reporter: Simon IJskes
>Priority: Minor
> Attachments: new.txt
>
>
> Currently there is no way to override recipients for a SMTP email.
> In order to forward an email to a secundairy address not specified in the 
> content-addressing, aka 'a redirect', a header called 'X-recipient' could be 
> used to override the recipients of the email.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (CAMEL-12117) custom javaMailSender does not benefit from URL parameters

2018-01-09 Thread Simon IJskes (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-12117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Simon IJskes closed CAMEL-12117.

Resolution: Won't Fix

> custom javaMailSender does not benefit from URL parameters
> --
>
> Key: CAMEL-12117
> URL: https://issues.apache.org/jira/browse/CAMEL-12117
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-mail
>Affects Versions: 2.20.1
>Reporter: Simon IJskes
>Priority: Minor
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> When a custom javaMailSender is used, no property setters are called on the 
> custom javaMailSender. This in constrast with the DefaultJavaMailSender. 
> In MailEndpoint.createProducer() the custom javaMailSender does not get the 
> 'replication' of the configuration properties as the createJavaMailSender() 
> does.
> The benefit of using the URL parameters is, when a custom sender is specified 
> by reference, and it is pulled from the spring registry, and is marked as 
> "prototype" scope, it allows the URL to configure this newly created custom 
> sender, thereby allowing multiple configured smtp producers from camel.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (CAMEL-12119) allow override of smtp recipients

2018-01-09 Thread Simon IJskes (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-12119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Simon IJskes closed CAMEL-12119.

Resolution: Won't Fix

> allow override of smtp recipients
> -
>
> Key: CAMEL-12119
> URL: https://issues.apache.org/jira/browse/CAMEL-12119
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-mail
>Affects Versions: 2.20.1
>Reporter: Simon IJskes
>Priority: Minor
> Attachments: new.txt
>
>
> Currently there is no way to override recipients for a SMTP email.
> In order to forward an email to a secundairy address not specified in the 
> content-addressing, aka 'a redirect', a header called 'X-recipient' could be 
> used to override the recipients of the email.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (CAMEL-12133) Update Camel documentation for ThrottlingExceptionRoutePolicy

2018-01-09 Thread Mike Barlotta (JIRA)
Mike Barlotta created CAMEL-12133:
-

 Summary: Update Camel documentation for 
ThrottlingExceptionRoutePolicy 
 Key: CAMEL-12133
 URL: https://issues.apache.org/jira/browse/CAMEL-12133
 Project: Camel
  Issue Type: Bug
  Components: camel-core
Affects Versions: 2.19.0
Reporter: Mike Barlotta
Priority: Minor


The `ThrottlingExceptionPolicy` circuit breaker EIP needs some documentation 
Perhaps on the Route Policy page but open to suggestions
http://camel.apache.org/routepolicy.html



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-12119) allow override of smtp recipients

2018-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16318732#comment-16318732
 ] 

ASF GitHub Bot commented on CAMEL-12119:


sijskes commented on issue #2172: fix for 
https://issues.apache.org/jira/browse/CAMEL-12119 [CAMEL-12119]
URL: https://github.com/apache/camel/pull/2172#issuecomment-356344459
 
 
   after reading your comment again, you are never going to accept this patch 
are you?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> allow override of smtp recipients
> -
>
> Key: CAMEL-12119
> URL: https://issues.apache.org/jira/browse/CAMEL-12119
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-mail
>Affects Versions: 2.20.1
>Reporter: Simon IJskes
>Priority: Minor
> Attachments: new.txt
>
>
> Currently there is no way to override recipients for a SMTP email.
> In order to forward an email to a secundairy address not specified in the 
> content-addressing, aka 'a redirect', a header called 'X-recipient' could be 
> used to override the recipients of the email.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-12119) allow override of smtp recipients

2018-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16318729#comment-16318729
 ] 

ASF GitHub Bot commented on CAMEL-12119:


sijskes commented on issue #2172: fix for 
https://issues.apache.org/jira/browse/CAMEL-12119 [CAMEL-12119]
URL: https://github.com/apache/camel/pull/2172#issuecomment-356343894
 
 
   so what is the issue with the header exact? that it is undocumented, or that 
is leaks in the email? 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> allow override of smtp recipients
> -
>
> Key: CAMEL-12119
> URL: https://issues.apache.org/jira/browse/CAMEL-12119
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-mail
>Affects Versions: 2.20.1
>Reporter: Simon IJskes
>Priority: Minor
> Attachments: new.txt
>
>
> Currently there is no way to override recipients for a SMTP email.
> In order to forward an email to a secundairy address not specified in the 
> content-addressing, aka 'a redirect', a header called 'X-recipient' could be 
> used to override the recipients of the email.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-12119) allow override of smtp recipients

2018-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16318730#comment-16318730
 ] 

ASF GitHub Bot commented on CAMEL-12119:


sijskes commented on issue #2172: fix for 
https://issues.apache.org/jira/browse/CAMEL-12119 [CAMEL-12119]
URL: https://github.com/apache/camel/pull/2172#issuecomment-356343894
 
 
   so what is the issue with the header exact? that it is undocumented, or that 
it leaks in the email? 
 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> allow override of smtp recipients
> -
>
> Key: CAMEL-12119
> URL: https://issues.apache.org/jira/browse/CAMEL-12119
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-mail
>Affects Versions: 2.20.1
>Reporter: Simon IJskes
>Priority: Minor
> Attachments: new.txt
>
>
> Currently there is no way to override recipients for a SMTP email.
> In order to forward an email to a secundairy address not specified in the 
> content-addressing, aka 'a redirect', a header called 'X-recipient' could be 
> used to override the recipients of the email.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-8799) Make it possible for JsonPath to suppress PathNotFoundException

2018-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-8799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16318669#comment-16318669
 ] 

ASF GitHub Bot commented on CAMEL-8799:
---

yihtserns commented on a change in pull request #528: CAMEL-8799: Make 
json-path suppress PathNotFoundExceptions by default
URL: https://github.com/apache/camel/pull/528#discussion_r160451573
 
 

 ##
 File path: 
components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JsonPathEngine.java
 ##
 @@ -38,7 +41,8 @@
 private final Configuration configuration;
 
 public JsonPathEngine(String expression) {
-this.configuration = Configuration.defaultConfiguration();
+Defaults defaults = DefaultsImpl.INSTANCE;
 
 Review comment:
   This comment is 2 years late, but I don't think there's any need to use 
json-path's internal API?
   
   `Configuration.Builder.build()` will do the same thing internally anyway if 
no custom `jsonProvider` provided.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Make it possible for JsonPath to suppress PathNotFoundException
> ---
>
> Key: CAMEL-8799
> URL: https://issues.apache.org/jira/browse/CAMEL-8799
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-jsonpath
>Affects Versions: 2.15.2
>Reporter: Preben Asmussen
>Assignee: Claus Ibsen
> Fix For: 2.16.0
>
>
> It should be possible to suppress exceptions when evaluating JsonPath's.
> See 
> http://camel.465427.n5.nabble.com/How-to-suppress-exceptions-from-Jsonpath-expressions-td5767384.html
> There are 2 options
> 1.  Make it the default behaviour, so a null value will be returned instead 
> of throwing an PathNotFoundException when evaluating json path expressions 
> and the path is not found. I have a working patch for that here 
> https://github.com/pax95/camel/commit/e09bd00d9199c88787f0acb0d2ea8c86e6a1bba9
>  that I can do a PR on.
> 2. Make it configurable on the JsonPath component so you can enable/disable 
> it on demand. This would also make it possible to expose other options from 
> com.jayway.jsonpath.Option if they make sense. More work is require to make 
> it available as both xml and java dsl.
> Currently I'm at bit overloaded to do a PR on 2 if that is the preferred 
> option, so if any want to take over It will be fine.
> If option 1 is ok I'll create a PR.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-12119) allow override of smtp recipients

2018-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16318656#comment-16318656
 ] 

ASF GitHub Bot commented on CAMEL-12119:


davsclaus commented on issue #2172: fix for 
https://issues.apache.org/jira/browse/CAMEL-12119 [CAMEL-12119]
URL: https://github.com/apache/camel/pull/2172#issuecomment-356329884
 
 
   You need to fix code formatting, run
   
   mvn compile -P sourcecheck
   
   in the camel-mail folder.
   
   Also as commented on the JIRA ticket we cannot just do this as `X-xxx` is 
not a standard header. So if something like this is to be implemented then we 
need an option to turn this explicit on, so existing users are not affected.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> allow override of smtp recipients
> -
>
> Key: CAMEL-12119
> URL: https://issues.apache.org/jira/browse/CAMEL-12119
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-mail
>Affects Versions: 2.20.1
>Reporter: Simon IJskes
>Priority: Minor
> Attachments: new.txt
>
>
> Currently there is no way to override recipients for a SMTP email.
> In order to forward an email to a secundairy address not specified in the 
> content-addressing, aka 'a redirect', a header called 'X-recipient' could be 
> used to override the recipients of the email.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (CAMEL-12132) camel-snmp v3 should provide pooling for multiple endpoint / user authentication

2018-01-09 Thread Ricardo Zanini (JIRA)
Ricardo Zanini created CAMEL-12132:
--

 Summary: camel-snmp v3 should provide pooling for multiple 
endpoint / user authentication
 Key: CAMEL-12132
 URL: https://issues.apache.org/jira/browse/CAMEL-12132
 Project: Camel
  Issue Type: Improvement
  Components: camel-snmp
Affects Versions: 2.20.1
Reporter: Ricardo Zanini
Priority: Minor


we want to use camel with multiple polling endpoints of type SNMP. The 
restrictions we have are:
- snmp version 3 with authentication and privacy
- each endpoint might have different credentials und securityName (user).

When we configure two endpoint with the URIs

snmp:192.168.56.101:161?snmpVersion=3&type=POLL&oids=1.3.6.1.2.1.7.5.1&authenticationPassphrase=&authenticationProtocol=SHA1
&privacyPassphrase=&privacyProtocol=PrivAES128&securityName=secname111&securityLevel=3

and

snmp:192.168.56.102:1612?snmpVersion=3&type=POLL&oids=1.3.6.1.2.1.7.5.1&authenticationPassphrase=&authenticationProtocol=SHA1
&privacyPassphrase=&privacyProtocol=PrivAES128&securityName=secname222&securityLevel=3

We get exceptions when polling the first endpoint

2018-01-08 13:05:12.124  WARN 3076 --- [.168.56.101:161] 
o.a.c.c.s.SnmpOIDPoller  : Consumer 
Consumer[snmp://192.168.56.101:161?authenticationPassphrase=xx&authenticationProtocol=SHA1&oids=1.3.6.1.2.1.7.5.1&privacyPassphrase=xx&privacyProtocol=AES128&securityLevel=3&securityName=
 secname111&snmpVersion=3&type=POLL] failed polling endpoint: 
snmp://udp:192.168.56.101/161. Will try again at next poll. Caused by: 
[org.snmp4j.MessageException - Message processing model 3 returned error: 
Unknown security name]

org.snmp4j.MessageException: Message processing model 3 returned error: Unknown 
security name
at 
org.snmp4j.MessageDispatcherImpl.sendPdu(MessageDispatcherImpl.java:520) 
~[snmp4j-2.5.0.jar:?]
at org.snmp4j.Snmp.sendMessage(Snmp.java:1059) ~[snmp4j-2.5.0.jar:?]
at org.snmp4j.Snmp.send(Snmp.java:1029) ~[snmp4j-2.5.0.jar:?]
at org.snmp4j.Snmp.send(Snmp.java:1013) ~[snmp4j-2.5.0.jar:?]
at 
org.apache.camel.component.snmp.SnmpOIDPoller.poll(SnmpOIDPoller.java:176) 
~[camel-snmp-2.19.4.jar:2.19.4]
at 
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
 [camel-core-2.19.4.jar:2.19.4]
at 
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101) 
[camel-core-2.19.4.jar:2.19.4]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) 
[?:1.8.0_112]
at java.util.concurrent.FutureTask.runAndReset(Unknown Source) 
[?:1.8.0_112]
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown
 Source) [?:1.8.0_112]
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
 Source) [?:1.8.0_112]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 
[?:1.8.0_112]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
[?:1.8.0_112]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_112]

It seems that after configuration of the second endpoint the security 
information of the first endpoint is not found/used anymore. 

See Nabble: 
http://camel.465427.n5.nabble.com/Bug-in-component-camel-snmp-td5816536.html



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-11665) Define a saga DSL and implementation for long running actions

2018-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-11665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16318565#comment-16318565
 ] 

ASF GitHub Bot commented on CAMEL-11665:


nicolaferraro opened a new pull request #2173: CAMEL-11665: Saga EIP
URL: https://github.com/apache/camel/pull/2173
 
 
   This adds support for Sagas in Apache Camel.
   
   From the doc:
   
   *The Saga EIP provides a way to define a series of related actions in a 
Camel route that should be either completed successfully (all of them) or 
not-executed/compensated. Sagas implementations are able to coordinate 
distributed services communicating using any transport towards a globally 
consistent outcome.*
   
   I've provided a pretty long explanation on what Sagas are and how to use 
them in [the 
readme](https://github.com/nicolaferraro/camel/blob/e09f097bb7d02955700886afb3f04526d7eccdc3/camel-core/src/main/docs/eips/saga-eip.adoc).
   
   For now I've provided 2 implementations of the EIP:
   - In memory: a local implementation not suitable for production. It is 
included in `camel-core`
   - LRA: based on the [Microsprofile sandbox LRA 
spec](https://github.com/eclipse/microprofile-sandbox/tree/master/proposals/0009-LRA).
 In is included in the `camel-lra` module
   
   They have the same semantic, but the LRA implementation provides consistency 
guarantees in various degrees of system failure. Other implementations can be 
plugged in in the future.
   
   Both implementations are completely asynchronous (that's why some pieces of 
code may look ugly :smile:).
   
   There are some other features I plan to work on:
   - Asynchronous compensations and related callbacks
   - Evaluate ways to integrate it better with the rest subsystem
   - Suggestions


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Define a saga DSL and implementation for long running actions
> -
>
> Key: CAMEL-11665
> URL: https://issues.apache.org/jira/browse/CAMEL-11665
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Reporter: Nicola Ferraro
>Assignee: Nicola Ferraro
>Priority: Minor
>
> I'm trying to define a saga interface and DSL for Camel in order to support 
> long running actions.
> I've done some experiments here: 
> https://github.com/nicolaferraro/camel/blob/8ad4a4a264bbcd882507893e810a65578253caa4/camel-core/src/test/java/org/apache/camel/processor/SagaTest.java#L102-L146
> The experiment works with a in memory saga manager.
> It should be possible to switch to a proper "long running action coordinator" 
> (e.g. the one proposed here 
> https://github.com/jbosstm/microprofile-sandbox/blob/0009-LRA/proposals/0009-LRA/0009-LRA.md)
>  once an implementation is ready.
> We can also think to provide our own implementation based on a shared 
> transaction log, but it will be a "hard" task and it would not be compatible 
> with other languages/frameworks, so the "spec" way should be preferable.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-11665) Define a saga DSL and implementation for long running actions

2018-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-11665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16318566#comment-16318566
 ] 

ASF GitHub Bot commented on CAMEL-11665:


GitHub user nicolaferraro opened a pull request:

https://github.com/apache/camel/pull/2173

CAMEL-11665: Saga EIP

This adds support for Sagas in Apache Camel.

From the doc:

*The Saga EIP provides a way to define a series of related actions in a 
Camel route that should be either completed successfully (all of them) or 
not-executed/compensated. Sagas implementations are able to coordinate 
distributed services communicating using any transport towards a globally 
consistent outcome.*

I've provided a pretty long explanation on what Sagas are and how to use 
them in [the 
readme](https://github.com/nicolaferraro/camel/blob/e09f097bb7d02955700886afb3f04526d7eccdc3/camel-core/src/main/docs/eips/saga-eip.adoc).

For now I've provided 2 implementations of the EIP:
- In memory: a local implementation not suitable for production. It is 
included in `camel-core`
- LRA: based on the [Microsprofile sandbox LRA 
spec](https://github.com/eclipse/microprofile-sandbox/tree/master/proposals/0009-LRA).
 In is included in the `camel-lra` module

They have the same semantic, but the LRA implementation provides 
consistency guarantees in various degrees of system failure. Other 
implementations can be plugged in in the future.

Both implementations are completely asynchronous (that's why some pieces of 
code may look ugly :smile:).

There are some other features I plan to work on:
- Asynchronous compensations and related callbacks
- Evaluate ways to integrate it better with the rest subsystem
- Suggestions

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/nicolaferraro/camel saga

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/camel/pull/2173.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2173


commit e09f097bb7d02955700886afb3f04526d7eccdc3
Author: Nicola Ferraro 
Date:   2017-08-09T14:50:19Z

CAMEL-11665: Saga EIP




> Define a saga DSL and implementation for long running actions
> -
>
> Key: CAMEL-11665
> URL: https://issues.apache.org/jira/browse/CAMEL-11665
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-core
>Reporter: Nicola Ferraro
>Assignee: Nicola Ferraro
>Priority: Minor
>
> I'm trying to define a saga interface and DSL for Camel in order to support 
> long running actions.
> I've done some experiments here: 
> https://github.com/nicolaferraro/camel/blob/8ad4a4a264bbcd882507893e810a65578253caa4/camel-core/src/test/java/org/apache/camel/processor/SagaTest.java#L102-L146
> The experiment works with a in memory saga manager.
> It should be possible to switch to a proper "long running action coordinator" 
> (e.g. the one proposed here 
> https://github.com/jbosstm/microprofile-sandbox/blob/0009-LRA/proposals/0009-LRA/0009-LRA.md)
>  once an implementation is ready.
> We can also think to provide our own implementation based on a shared 
> transaction log, but it will be a "hard" task and it would not be compatible 
> with other languages/frameworks, so the "spec" way should be preferable.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-12125) Add keepOpen to the ThrottlingExceptionRoutePolicy circuit breaker

2018-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16318452#comment-16318452
 ] 

ASF GitHub Bot commented on CAMEL-12125:


CodeSmell commented on issue #2165: [CAMEL-12125] add keepOpen to endpoint 
circuit breaker
URL: https://github.com/apache/camel/pull/2165#issuecomment-356290690
 
 
   Think I got all the requested changes added 
   Thanks


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add keepOpen to the ThrottlingExceptionRoutePolicy circuit breaker
> --
>
> Key: CAMEL-12125
> URL: https://issues.apache.org/jira/browse/CAMEL-12125
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.19.0
>Reporter: Mike Barlotta
>Priority: Minor
>
> a useful addition to the endpoint circuit breaker (see CAMEL-10718) would be 
> the ability to force it into the open state so that it suspends consuming 
> even if there are no exceptions. 
> this would function similar to the Netflix Hystrix forceOpen
> https://github.com/Netflix/Hystrix/wiki/Configuration#circuitBreaker.forceOpen
> Willing to submit a PR



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-12079) Bean language: support bean::function notation

2018-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16318362#comment-16318362
 ] 

ASF GitHub Bot commented on CAMEL-12079:


lburgazzoli commented on a change in pull request #2156: CAMEL-12079: Bean 
language: support bean::function notation
URL: https://github.com/apache/camel/pull/2156#discussion_r160396500
 
 

 ##
 File path: 
camel-core/src/main/java/org/apache/camel/language/bean/BeanLanguage.java
 ##
 @@ -95,6 +95,12 @@ public Expression createExpression(String expression) {
 if (idx > 0) {
 beanName = expression.substring(0, idx);
 method = expression.substring(idx + 1);
+} else {
+int doubleColonIndex = expression.indexOf("::");
+if (doubleColonIndex > 0) {
+beanName = expression.substring(0, doubleColonIndex);
+method = expression.substring(doubleColonIndex + 2);
+}
 
 Review comment:
   We should check first for `::`` then for `.` otherwise expressions like 
`my.own.Bean::function` would lead to error   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Bean language: support bean::function notation
> --
>
> Key: CAMEL-12079
> URL: https://issues.apache.org/jira/browse/CAMEL-12079
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core
>Reporter: Luca Burgazzoli
>Priority: Minor
> Fix For: 2.21.0
>
>
> As today the bean language supports:
> - bean?function
> - bean.function
> it would be nice if we support also
> -  bean::function



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-12079) Bean language: support bean::function notation

2018-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16318361#comment-16318361
 ] 

ASF GitHub Bot commented on CAMEL-12079:


lburgazzoli commented on issue #2156: CAMEL-12079: Bean language: support 
bean::function notation
URL: https://github.com/apache/camel/pull/2156#issuecomment-356274103
 
 
   If there are other places where the . notation is used we should update that 
too


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Bean language: support bean::function notation
> --
>
> Key: CAMEL-12079
> URL: https://issues.apache.org/jira/browse/CAMEL-12079
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core
>Reporter: Luca Burgazzoli
>Priority: Minor
> Fix For: 2.21.0
>
>
> As today the bean language supports:
> - bean?function
> - bean.function
> it would be nice if we support also
> -  bean::function



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (CAMEL-12126) camel-ftp - Add support for restarting downloads

2018-01-09 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-12126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-12126.
-
Resolution: Fixed

> camel-ftp - Add support for restarting downloads
> 
>
> Key: CAMEL-12126
> URL: https://issues.apache.org/jira/browse/CAMEL-12126
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-ftp
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
> Fix For: 2.21.0
>
>
> When downloading big files it would be good to have support for
> - downloading these files as streams into a temporary directory (local work 
> dir etc)
> - be able to shutdown Camel during download
> - be able to start Camel again, and have camel-ftp resume downloading the file



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-12126) camel-ftp - Add support for restarting downloads

2018-01-09 Thread Claus Ibsen (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16318327#comment-16318327
 ] 

Claus Ibsen commented on CAMEL-12126:
-

Added new option resumeDownload.

The missing bits is to adjust the transfer logger to deal with resume downloads 
so it can report this better and also jump ahead in the position of the file in 
its progress logging

> camel-ftp - Add support for restarting downloads
> 
>
> Key: CAMEL-12126
> URL: https://issues.apache.org/jira/browse/CAMEL-12126
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-ftp
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
> Fix For: 2.21.0
>
>
> When downloading big files it would be good to have support for
> - downloading these files as streams into a temporary directory (local work 
> dir etc)
> - be able to shutdown Camel during download
> - be able to start Camel again, and have camel-ftp resume downloading the file



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (CAMEL-12131) CacheProducer should not put services in Camel context, that are not singletons and are not ServicePoolAware

2018-01-09 Thread JIRA

 [ 
https://issues.apache.org/jira/browse/CAMEL-12131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rafał Gała updated CAMEL-12131:
---
Description: 
When the org.apache.camel.impl.ProducerCache *doGetProducer* method is called 
from *org.apache.camel.processor.SendProcessor's doStart()* method, it will 
create new instance of a Producer, and put it into Camel context by calling 
*getCamelContext().addService(answer, false);*. However, it will not put the 
object into producers or the pool map, because it is not ServicePoolAware and 
is not a singleton. This results in a service that will later be started by 
*DeferServiceStartupListener* and will stay started until the whole context is 
closed. 

{code:java}
protected synchronized Producer doGetProducer(Endpoint endpoint, boolean 
pooled) {
String key = endpoint.getEndpointUri();
Producer answer = producers.get(key);
if (pooled && answer == null) {
// try acquire from connection pool
answer = pool.acquire(endpoint);
}

if (answer == null) {
// create a new producer
try {
answer = endpoint.createProducer();
// add as service which will also start the service
// (false => we and handling the lifecycle of the producer in 
this cache)
getCamelContext().addService(answer, false);
} catch (Throwable e) {
throw new FailedToCreateProducerException(endpoint, e);
}

// add producer to cache or pool if applicable
if (pooled && answer instanceof ServicePoolAware) {
LOG.debug("Adding to producer service pool with key: {} for 
producer: {}", endpoint, answer);
answer = pool.addAndAcquire(endpoint, answer);
} else if (answer.isSingleton()) {
LOG.debug("Adding to producer cache with key: {} for producer: 
{}", endpoint, answer);
producers.put(key, answer);
}
}

if (answer != null) {
// record statistics
if (extendedStatistics) {
statistics.onHit(key);
}
}

return answer;
}

{code}

Here is the part of *doStart()* method from *SendProcessor* class. The producer 
is acquired and after that is immediately released in *ProducerCache*, however 
it is not removed from Camel context and stays there as a Service and will 
later by started by *DeferServiceStartupListener*

{code:java}
Producer producer = producerCache.acquireProducer(destination);
if (producer instanceof ServicePoolAware || !producer.isSingleton()) {
// no we cannot optimize it - so release the producer back to the 
producer cache
// and use the producer cache for sending
producerCache.releaseProducer(destination, producer);
} else {
// yes we can optimize and use the producer directly for sending
this.producer = AsyncProcessorConverterHelper.convert(producer);
}
{code}






  was:
When the org.apache.camel.impl.ProducerCache *doGetProducer* method is called 
from *org.apache.camel.processor.SendProcessor's doStart()* method, it will 
create new instance of a Producer, and put it into Camel context by calling 
*getCamelContext().addService(answer, false);*. However, it will not put the 
object into producers or the pool map, because it is not ServicePoolAware and 
is not a singleton. This results in a service that will later be started by 
*DeferServiceStartupListener* and will stay started until the whole context is 
closed. 

{code:java}
protected synchronized Producer doGetProducer(Endpoint endpoint, boolean 
pooled) {
String key = endpoint.getEndpointUri();
Producer answer = producers.get(key);
if (pooled && answer == null) {
// try acquire from connection pool
answer = pool.acquire(endpoint);
}

if (answer == null) {
// create a new producer
try {
answer = endpoint.createProducer();
// add as service which will also start the service
// (false => we and handling the lifecycle of the producer in 
this cache)
*getCamelContext().addService(answer, false);*
} catch (Throwable e) {
throw new FailedToCreateProducerException(endpoint, e);
}

// add producer to cache or pool if applicable
if (pooled && answer instanceof ServicePoolAware) {
LOG.debug("Adding to producer service pool with key: {} for 
producer: {}", endpoint, answer);
answer = pool.addAndAcquire(endpoint, answer);
} else if (answer.isSingleton()) {
LOG.debug("Adding to producer cache with key: {} for producer: 
{}", endpoint, answer);
  

[jira] [Created] (CAMEL-12131) CacheProducer should not put services in Camel context, that are not singletons and are not ServicePoolAware

2018-01-09 Thread JIRA
Rafał Gała created CAMEL-12131:
--

 Summary: CacheProducer should not put services in Camel context, 
that are not singletons and are not ServicePoolAware
 Key: CAMEL-12131
 URL: https://issues.apache.org/jira/browse/CAMEL-12131
 Project: Camel
  Issue Type: Bug
  Components: camel-core
Reporter: Rafał Gała
Priority: Minor


When the org.apache.camel.impl.ProducerCache *doGetProducer* method is called 
from *org.apache.camel.processor.SendProcessor's doStart()* method, it will 
create new instance of a Producer, and put it into Camel context by calling 
*getCamelContext().addService(answer, false);*. However, it will not put the 
object into producers or the pool map, because it is not ServicePoolAware and 
is not a singleton. This results in a service that will later be started by 
*DeferServiceStartupListener* and will stay started until the whole context is 
closed. 

{code:java}
protected synchronized Producer doGetProducer(Endpoint endpoint, boolean 
pooled) {
String key = endpoint.getEndpointUri();
Producer answer = producers.get(key);
if (pooled && answer == null) {
// try acquire from connection pool
answer = pool.acquire(endpoint);
}

if (answer == null) {
// create a new producer
try {
answer = endpoint.createProducer();
// add as service which will also start the service
// (false => we and handling the lifecycle of the producer in 
this cache)
*getCamelContext().addService(answer, false);*
} catch (Throwable e) {
throw new FailedToCreateProducerException(endpoint, e);
}

// add producer to cache or pool if applicable
if (pooled && answer instanceof ServicePoolAware) {
LOG.debug("Adding to producer service pool with key: {} for 
producer: {}", endpoint, answer);
answer = pool.addAndAcquire(endpoint, answer);
} else if (answer.isSingleton()) {
LOG.debug("Adding to producer cache with key: {} for producer: 
{}", endpoint, answer);
producers.put(key, answer);
}
}

if (answer != null) {
// record statistics
if (extendedStatistics) {
statistics.onHit(key);
}
}

return answer;
}

{code}

Here is the part of *doStart()* method from *SendProcessor* class. The producer 
is acquired and after that is immediately released in *ProducerCache*, however 
it is not removed from Camel context and stays there as a Service and will 
later by started by *DeferServiceStartupListener*

{code:java}
Producer producer = producerCache.acquireProducer(destination);
if (producer instanceof ServicePoolAware || !producer.isSingleton()) {
// no we cannot optimize it - so release the producer back to the 
producer cache
// and use the producer cache for sending
producerCache.releaseProducer(destination, producer);
} else {
// yes we can optimize and use the producer directly for sending
this.producer = AsyncProcessorConverterHelper.convert(producer);
}
{code}








--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-12119) allow override of smtp recipients

2018-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16318284#comment-16318284
 ] 

ASF GitHub Bot commented on CAMEL-12119:


sijskes opened a new pull request #2172: fix for 
https://issues.apache.org/jira/browse/CAMEL-12119 [CAMEL-12119]
URL: https://github.com/apache/camel/pull/2172
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> allow override of smtp recipients
> -
>
> Key: CAMEL-12119
> URL: https://issues.apache.org/jira/browse/CAMEL-12119
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-mail
>Affects Versions: 2.20.1
>Reporter: Simon IJskes
>Priority: Minor
> Attachments: new.txt
>
>
> Currently there is no way to override recipients for a SMTP email.
> In order to forward an email to a secundairy address not specified in the 
> content-addressing, aka 'a redirect', a header called 'X-recipient' could be 
> used to override the recipients of the email.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-12119) allow override of smtp recipients

2018-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16318285#comment-16318285
 ] 

ASF GitHub Bot commented on CAMEL-12119:


GitHub user sijskes opened a pull request:

https://github.com/apache/camel/pull/2172

fix for https://issues.apache.org/jira/browse/CAMEL-12119 [CAMEL-12119]



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/QualityConsultancyGroup/camel master

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/camel/pull/2172.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2172


commit 457b23b036491d9f4639a56045de38e0094fedc8
Author: Simon IJskes 
Date:   2018-01-09T11:27:43Z

fix for https://issues.apache.org/jira/browse/CAMEL-12119 [CAMEL-12119]




> allow override of smtp recipients
> -
>
> Key: CAMEL-12119
> URL: https://issues.apache.org/jira/browse/CAMEL-12119
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-mail
>Affects Versions: 2.20.1
>Reporter: Simon IJskes
>Priority: Minor
> Attachments: new.txt
>
>
> Currently there is no way to override recipients for a SMTP email.
> In order to forward an email to a secundairy address not specified in the 
> content-addressing, aka 'a redirect', a header called 'X-recipient' could be 
> used to override the recipients of the email.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-12130) Upgrade braintree SDK to v2.74.0

2018-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16318223#comment-16318223
 ] 

ASF GitHub Bot commented on CAMEL-12130:


nofuss commented on issue #2171: CAMEL-12130: camel-braintree - upgrade 
Braintree SDK to v2.74.0
URL: https://github.com/apache/camel/pull/2171#issuecomment-356245318
 
 
   outstanding - thanks


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Upgrade braintree SDK to v2.74.0
> 
>
> Key: CAMEL-12130
> URL: https://issues.apache.org/jira/browse/CAMEL-12130
> Project: Camel
>  Issue Type: Task
>  Components: camel-braintree
>Reporter: Russ Johnson
>Assignee: Andrea Cosentino
> Fix For: 2.21.0
>
>
> Minimal upgrade of Braintree SDK in order to enable subsequent work on newly 
> supported features



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-12130) Upgrade braintree SDK to v2.74.0

2018-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16318214#comment-16318214
 ] 

ASF GitHub Bot commented on CAMEL-12130:


Github user oscerd closed the pull request at:

https://github.com/apache/camel/pull/2171


> Upgrade braintree SDK to v2.74.0
> 
>
> Key: CAMEL-12130
> URL: https://issues.apache.org/jira/browse/CAMEL-12130
> Project: Camel
>  Issue Type: Task
>  Components: camel-braintree
>Reporter: Russ Johnson
>Assignee: Andrea Cosentino
> Fix For: 2.21.0
>
>
> Minimal upgrade of Braintree SDK in order to enable subsequent work on newly 
> supported features



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-12130) Upgrade braintree SDK to v2.74.0

2018-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16318212#comment-16318212
 ] 

ASF GitHub Bot commented on CAMEL-12130:


oscerd closed pull request #2171: CAMEL-12130: camel-braintree - upgrade 
Braintree SDK to v2.74.0
URL: https://github.com/apache/camel/pull/2171
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/components/camel-braintree/pom.xml 
b/components/camel-braintree/pom.xml
index 498fdb51e50..1637634d6a6 100644
--- a/components/camel-braintree/pom.xml
+++ b/components/camel-braintree/pom.xml
@@ -151,6 +151,22 @@
   merchantAccount
   
com.braintreegateway.MerchantAccountGateway
   
+  
+
+  ^.+$
+  ^.+$
+  
com.braintreegateway.MerchantAccountRequest
+  request
+  false
+
+
+  ^.+$
+  ^.+$
+  
com.braintreegateway.MerchantAccountCreateForCurrencyRequest
+  currencyRequest
+  false
+
+  
 
 
   paymentMethod
@@ -158,6 +174,22 @@
   
 .*parse.*
   
+  
+
+  ^.+$
+  ^.+$
+  
com.braintreegateway.PaymentMethodRequest
+  request
+  false
+
+
+  ^.+$
+  ^.+$
+  
com.braintreegateway.PaymentMethodDeleteRequest
+  deleteRequest
+  false
+
+  
 
 
   paymentMethodNonce
@@ -195,6 +227,13 @@
   request
   false
 
+
+  ^.+$
+  ^.+$
+  
com.braintreegateway.TransactionRefundRequest
+  refundRequest
+  false
+
 
   ^.+$
   ^.+$
diff --git a/parent/pom.xml b/parent/pom.xml
index b2f70a0e8b2..b81176de916 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -97,7 +97,7 @@
 1.57
 3.2.1
 2.8.2
-2.63.0
+2.74.0
 4.13.2
 1.10
 0.9.5.2


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Upgrade braintree SDK to v2.74.0
> 
>
> Key: CAMEL-12130
> URL: https://issues.apache.org/jira/browse/CAMEL-12130
> Project: Camel
>  Issue Type: Task
>  Components: camel-braintree
>Reporter: Russ Johnson
>Assignee: Andrea Cosentino
> Fix For: 2.21.0
>
>
> Minimal upgrade of Braintree SDK in order to enable subsequent work on newly 
> supported features



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-12130) Upgrade braintree SDK to v2.74.0

2018-01-09 Thread Andrea Cosentino (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16318208#comment-16318208
 ] 

Andrea Cosentino commented on CAMEL-12130:
--

This version bring a org.json dependency for the Karaf feature, we need to find 
a way to avoid org.json stuff for license problem. We can't backport this fix 
to 2.20.x otherwise we'll need to use org.json there too.

> Upgrade braintree SDK to v2.74.0
> 
>
> Key: CAMEL-12130
> URL: https://issues.apache.org/jira/browse/CAMEL-12130
> Project: Camel
>  Issue Type: Task
>  Components: camel-braintree
>Reporter: Russ Johnson
>Assignee: Andrea Cosentino
> Fix For: 2.21.0
>
>
> Minimal upgrade of Braintree SDK in order to enable subsequent work on newly 
> supported features



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (CAMEL-12130) Upgrade braintree SDK to v2.74.0

2018-01-09 Thread Andrea Cosentino (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-12130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrea Cosentino resolved CAMEL-12130.
--
Resolution: Fixed

> Upgrade braintree SDK to v2.74.0
> 
>
> Key: CAMEL-12130
> URL: https://issues.apache.org/jira/browse/CAMEL-12130
> Project: Camel
>  Issue Type: Task
>  Components: camel-braintree
>Reporter: Russ Johnson
>Assignee: Andrea Cosentino
> Fix For: 2.21.0
>
>
> Minimal upgrade of Braintree SDK in order to enable subsequent work on newly 
> supported features



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-12130) Upgrade braintree SDK to v2.74.0

2018-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16318202#comment-16318202
 ] 

ASF GitHub Bot commented on CAMEL-12130:


oscerd commented on issue #2171: CAMEL-12130: camel-braintree - upgrade 
Braintree SDK to v2.74.0
URL: https://github.com/apache/camel/pull/2171#issuecomment-356241810
 
 
   Thanks the PR has been merged.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Upgrade braintree SDK to v2.74.0
> 
>
> Key: CAMEL-12130
> URL: https://issues.apache.org/jira/browse/CAMEL-12130
> Project: Camel
>  Issue Type: Task
>  Components: camel-braintree
>Reporter: Russ Johnson
> Fix For: 2.21.0
>
>
> Minimal upgrade of Braintree SDK in order to enable subsequent work on newly 
> supported features



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Assigned] (CAMEL-12130) Upgrade braintree SDK to v2.74.0

2018-01-09 Thread Andrea Cosentino (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-12130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrea Cosentino reassigned CAMEL-12130:


Assignee: Andrea Cosentino

> Upgrade braintree SDK to v2.74.0
> 
>
> Key: CAMEL-12130
> URL: https://issues.apache.org/jira/browse/CAMEL-12130
> Project: Camel
>  Issue Type: Task
>  Components: camel-braintree
>Reporter: Russ Johnson
>Assignee: Andrea Cosentino
> Fix For: 2.21.0
>
>
> Minimal upgrade of Braintree SDK in order to enable subsequent work on newly 
> supported features



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (CAMEL-12130) Upgrade braintree SDK to v2.74.0

2018-01-09 Thread Andrea Cosentino (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-12130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrea Cosentino updated CAMEL-12130:
-
Fix Version/s: (was: 2.20.2)

> Upgrade braintree SDK to v2.74.0
> 
>
> Key: CAMEL-12130
> URL: https://issues.apache.org/jira/browse/CAMEL-12130
> Project: Camel
>  Issue Type: Task
>  Components: camel-braintree
>Reporter: Russ Johnson
> Fix For: 2.21.0
>
>
> Minimal upgrade of Braintree SDK in order to enable subsequent work on newly 
> supported features



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-12130) Upgrade braintree SDK to v2.74.0

2018-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16318187#comment-16318187
 ] 

ASF GitHub Bot commented on CAMEL-12130:


GitHub user nofuss opened a pull request:

https://github.com/apache/camel/pull/2171

CAMEL-12130: camel-braintree - upgrade Braintree SDK to v2.74.0

Minimal changes required to be able to upgrade braintree SDK to 2.74.0

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/nofuss/camel CAMEL-12130

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/camel/pull/2171.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2171


commit a058798124322d4ddc850796196052248a57412a
Author: Russ Johnson 
Date:   2018-01-05T12:07:44Z

Minimal changes required to be able to upgrade braintree SDK to 2.74.0




> Upgrade braintree SDK to v2.74.0
> 
>
> Key: CAMEL-12130
> URL: https://issues.apache.org/jira/browse/CAMEL-12130
> Project: Camel
>  Issue Type: Task
>  Components: camel-braintree
>Reporter: Russ Johnson
> Fix For: 2.20.2, 2.21.0
>
>
> Minimal upgrade of Braintree SDK in order to enable subsequent work on newly 
> supported features



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CAMEL-12130) Upgrade braintree SDK to v2.74.0

2018-01-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CAMEL-12130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16318186#comment-16318186
 ] 

ASF GitHub Bot commented on CAMEL-12130:


nofuss opened a new pull request #2171: CAMEL-12130: camel-braintree - upgrade 
Braintree SDK to v2.74.0
URL: https://github.com/apache/camel/pull/2171
 
 
   Minimal changes required to be able to upgrade braintree SDK to 2.74.0


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Upgrade braintree SDK to v2.74.0
> 
>
> Key: CAMEL-12130
> URL: https://issues.apache.org/jira/browse/CAMEL-12130
> Project: Camel
>  Issue Type: Task
>  Components: camel-braintree
>Reporter: Russ Johnson
> Fix For: 2.20.2, 2.21.0
>
>
> Minimal upgrade of Braintree SDK in order to enable subsequent work on newly 
> supported features



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (CAMEL-12127) camel-ftp - Add option to turn on logging of transfer activity

2018-01-09 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-12127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-12127.
-
Resolution: Fixed

> camel-ftp - Add option to turn on logging of transfer activity
> --
>
> Key: CAMEL-12127
> URL: https://issues.apache.org/jira/browse/CAMEL-12127
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-ftp
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
> Fix For: 2.21.0
>
>
> So you can see how far you have downloaded or uploaded files with the ftp 
> component. This does not work with the sftp (ssh ftp).
> {code}
> 2018-01-06 15:08:53,198 [//src/main/data] INFO  FtpOperations 
>  - Uploading: bar.xml (chunk: 873, total chunk: 873 bytes)
> 2018-01-06 15:08:53,211 [//src/main/data] INFO  FtpOperations 
>  - Uploading: foo.xml (chunk: 873, total chunk: 873 bytes)
> 2018-01-06 15:08:53,708 [1000/tmp2/camel] INFO  FtpOperations 
>  - Downloading: bar.xml (chunk: 873, total chunk: 873 bytes)
> 2018-01-06 15:08:53,713 [1000/tmp2/camel] INFO  FtpOperations 
>  - Downloading: foo.xml (chunk: 1, total chunk: 1 bytes)
> 2018-01-06 15:08:53,713 [1000/tmp2/camel] INFO  FtpOperations 
>  - Downloading: foo.xml (chunk: 872, total chunk: 873 bytes)
> {code}
> We can also not see the total size of the file, as the FTP client 
> implementation does not provide that detail.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)