[jira] [Created] (CAMEL-12201) camel-wordpress: add support for JWT authentication

2018-01-26 Thread Ricardo Zanini (JIRA)
Ricardo Zanini created CAMEL-12201:
--

 Summary: camel-wordpress: add support for JWT authentication
 Key: CAMEL-12201
 URL: https://issues.apache.org/jira/browse/CAMEL-12201
 Project: Camel
  Issue Type: New Feature
Reporter: Ricardo Zanini


`camel-wordpress` supports only Basic Authentication, which isn't the best 
approach for production environments.

For this to work, the plugin [JWT 
Authentication|https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/]
 must be installed on Wordpress.

There's a lot of plugins that implement JWT Authentication, but this one seems 
[more 
reliable|https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/#authentication-plugins]
 and that's the one with more updates and stars. So, we should stick to it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


***UNCHECKED*** [jira] [Created] (CAMEL-12200) Fix IndexOutOfBounds exception when generating acknowledgment

2018-01-26 Thread Quinn Stevenson (JIRA)
Quinn Stevenson created CAMEL-12200:
---

 Summary: Fix IndexOutOfBounds exception when generating 
acknowledgment
 Key: CAMEL-12200
 URL: https://issues.apache.org/jira/browse/CAMEL-12200
 Project: Camel
  Issue Type: Improvement
  Components: camel-mllp
Reporter: Quinn Stevenson
Assignee: Quinn Stevenson


Under certain circumstances, generating acknowledgements will fail with an 
IndexOutOfBounds exception.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (CAMEL-12199) camel-spring.xsd is not pointing to the latest version

2018-01-26 Thread Alberto Scotto (JIRA)
Alberto Scotto created CAMEL-12199:
--

 Summary: camel-spring.xsd is not pointing to the latest version
 Key: CAMEL-12199
 URL: https://issues.apache.org/jira/browse/CAMEL-12199
 Project: Camel
  Issue Type: Bug
  Components: camel-spring
Reporter: Alberto Scotto


Judging from the size and date of the file, as you can see in the [directory 
listing|http://camel.apache.org/schema/spring/], it looks like that 
[http://camel.apache.org/schema/spring/camel-spring.xsd] is pointing to 
[camel-spring-2.18.3.xsd|http://camel.apache.org/schema/spring/camel-spring-2.18.3.xsd],
 not the latest.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (CAMEL-12196) Mock endpoint - message().body().matches().simple - Does not work

2018-01-26 Thread Claus Ibsen (JIRA)

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

Claus Ibsen updated CAMEL-12196:

Summary: Mock endpoint - message().body().matches().simple - Does not work  
(was: Mock endpoint - body().matches().simple - Does not work)

> Mock endpoint - message().body().matches().simple - Does not work
> -
>
> Key: CAMEL-12196
> URL: https://issues.apache.org/jira/browse/CAMEL-12196
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.19.4, 2.20.1
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.19.5, 2.20.3, 2.21.0
>
>
> Reported on gitter
> https://gitter.im/apache/apache-camel?at=5a6604ab5ade18be39aa9ca7



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (CAMEL-12196) Mock endpoint - body().matches().simple - Does not work

2018-01-26 Thread Claus Ibsen (JIRA)

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

Claus Ibsen resolved CAMEL-12196.
-
Resolution: Fixed

> Mock endpoint - body().matches().simple - Does not work
> ---
>
> Key: CAMEL-12196
> URL: https://issues.apache.org/jira/browse/CAMEL-12196
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.19.4, 2.20.1
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.19.5, 2.20.3, 2.21.0
>
>
> Reported on gitter
> https://gitter.im/apache/apache-camel?at=5a6604ab5ade18be39aa9ca7



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (CAMEL-12197) Automatic discovery of LogListener and UuidGenerator

2018-01-26 Thread Luca Burgazzoli (JIRA)

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

Luca Burgazzoli resolved CAMEL-12197.
-
Resolution: Fixed

> Automatic discovery of LogListener and UuidGenerator
> 
>
> Key: CAMEL-12197
> URL: https://issues.apache.org/jira/browse/CAMEL-12197
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core-xml, camel-spring-boot
>Reporter: Luca Burgazzoli
>Assignee: Luca Burgazzoli
>Priority: Minor
> Fix For: 2.21.0
>
>
> It would be nice if  beans of type LogListener or UuidGenerator are 
> automatically discovered from the registry
> Impacts:
> - AbstractCamelContextFactoryBean
> - CamelAutoConfiguration



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12197) Automatic discovery of LogListener and UuidGenerator

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

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

ASF GitHub Bot commented on CAMEL-12197:


Github user lburgazzoli closed the pull request at:

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


> Automatic discovery of LogListener and UuidGenerator
> 
>
> Key: CAMEL-12197
> URL: https://issues.apache.org/jira/browse/CAMEL-12197
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core-xml, camel-spring-boot
>Reporter: Luca Burgazzoli
>Assignee: Luca Burgazzoli
>Priority: Minor
> Fix For: 2.21.0
>
>
> It would be nice if  beans of type LogListener or UuidGenerator are 
> automatically discovered from the registry
> Impacts:
> - AbstractCamelContextFactoryBean
> - CamelAutoConfiguration



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12197) Automatic discovery of LogListener and UuidGenerator

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

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

ASF GitHub Bot commented on CAMEL-12197:


lburgazzoli closed pull request #2194: CAMEL-12197: Automatic discovery of 
LogListener and UuidGenerator
URL: https://github.com/apache/camel/pull/2194
 
 
   

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-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
 
b/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
index 3284c4b1e66..71386aee4d6 100644
--- 
a/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
+++ 
b/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
@@ -96,6 +96,7 @@
 import org.apache.camel.spi.InflightRepository;
 import org.apache.camel.spi.InterceptStrategy;
 import org.apache.camel.spi.LifecycleStrategy;
+import org.apache.camel.spi.LogListener;
 import org.apache.camel.spi.ManagementNamingStrategy;
 import org.apache.camel.spi.ManagementStrategy;
 import org.apache.camel.spi.MessageHistoryFactory;
@@ -375,6 +376,23 @@ public void afterPropertiesSet() throws Exception {
 LOG.info("Using RouteController: " + routeController);
 getContext().setRouteController(routeController);
 }
+// UuidGenerator
+UuidGenerator uuidGenerator = getBeanForType(UuidGenerator.class);
+if (uuidGenerator != null) {
+LOG.info("Using custom UuidGenerator: {}", uuidGenerator);
+getContext().setUuidGenerator(uuidGenerator);
+}
+// LogListener
+Map logListeners = 
getContext().getRegistry().findByTypeWithName(LogListener.class);
+if (logListeners != null && !logListeners.isEmpty()) {
+for (Map.Entry entry : 
logListeners.entrySet()) {
+LogListener logListener = entry.getValue();
+if (!getContext().getLogListeners().contains(logListener)) {
+LOG.info("Using custom LogListener with id: {} and 
implementation: {}", entry.getKey(), logListener);
+getContext().addLogListener(logListener);
+}
+}
+}
 
 // set the default thread pool profile if defined
 initThreadPoolProfiles(getContext());
diff --git 
a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java
 
b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java
index badc9d699f7..4757ab47590 100644
--- 
a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java
+++ 
b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/CamelAutoConfiguration.java
@@ -47,6 +47,7 @@
 import org.apache.camel.spi.InflightRepository;
 import org.apache.camel.spi.InterceptStrategy;
 import org.apache.camel.spi.LifecycleStrategy;
+import org.apache.camel.spi.LogListener;
 import org.apache.camel.spi.ManagementNamingStrategy;
 import org.apache.camel.spi.ManagementStrategy;
 import org.apache.camel.spi.ReloadStrategy;
@@ -57,6 +58,7 @@
 import org.apache.camel.spi.StreamCachingStrategy;
 import org.apache.camel.spi.ThreadPoolProfile;
 import org.apache.camel.spi.UnitOfWorkFactory;
+import org.apache.camel.spi.UuidGenerator;
 import org.apache.camel.spring.CamelBeanPostProcessor;
 import org.apache.camel.spring.SpringCamelContext;
 import org.apache.camel.spring.spi.XmlCamelContextConfigurer;
@@ -510,6 +512,23 @@ static void afterPropertiesSet(ApplicationContext 
applicationContext, CamelConte
 LOG.info("Using RouteController: " + routeController);
 camelContext.setRouteController(routeController);
 }
+// UuidGenerator
+UuidGenerator uuidGenerator = getSingleBeanOfType(applicationContext, 
UuidGenerator.class);
+if (uuidGenerator != null) {
+LOG.info("Using custom UuidGenerator: {}", uuidGenerator);
+camelContext.setUuidGenerator(uuidGenerator);
+}
+// LogListener
+Map logListeners = 
applicationContext.getBeansOfType(LogListener.class);
+if (logListeners != null && !logListeners.isEmpty()) {
+for (Map.Entry entry : 
logListeners.entrySet()) {
+LogListener logListener = entry.getValue();
+if (!camelContext.getLogListeners().contains(logListener)) {
+LOG.info("Using custom 

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

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

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

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-360774090
 
 
   @snurmine do you have any time to complete this PR ?


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
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12197) Automatic discovery of LogListener and UuidGenerator

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

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

ASF GitHub Bot commented on CAMEL-12197:


lburgazzoli commented on issue #2194: CAMEL-12197: Automatic discovery of 
LogListener and UuidGenerator
URL: https://github.com/apache/camel/pull/2194#issuecomment-360773981
 
 
   @davsclaus do you mind having a quick look to check if I missed something 
obvious ? 


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


> Automatic discovery of LogListener and UuidGenerator
> 
>
> Key: CAMEL-12197
> URL: https://issues.apache.org/jira/browse/CAMEL-12197
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core-xml, camel-spring-boot
>Reporter: Luca Burgazzoli
>Assignee: Luca Burgazzoli
>Priority: Minor
> Fix For: 2.21.0
>
>
> It would be nice if  beans of type LogListener or UuidGenerator are 
> automatically discovered from the registry
> Impacts:
> - AbstractCamelContextFactoryBean
> - CamelAutoConfiguration



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12197) Automatic discovery of LogListener and UuidGenerator

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

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

ASF GitHub Bot commented on CAMEL-12197:


GitHub user lburgazzoli opened a pull request:

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

CAMEL-12197: Automatic discovery of LogListener and UuidGenerator



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

$ git pull https://github.com/lburgazzoli/apache-camel CAMEL-12197

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

https://github.com/apache/camel/pull/2194.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 #2194


commit eaac8e9fe002fbcd742b8b21691be1d64a575b00
Author: lburgazzoli 
Date:   2018-01-26T12:35:48Z

CAMEL-12197: Automatic discovery of LogListener and UuidGenerator




> Automatic discovery of LogListener and UuidGenerator
> 
>
> Key: CAMEL-12197
> URL: https://issues.apache.org/jira/browse/CAMEL-12197
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core-xml, camel-spring-boot
>Reporter: Luca Burgazzoli
>Assignee: Luca Burgazzoli
>Priority: Minor
> Fix For: 2.21.0
>
>
> It would be nice if  beans of type LogListener or UuidGenerator are 
> automatically discovered from the registry
> Impacts:
> - AbstractCamelContextFactoryBean
> - CamelAutoConfiguration



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work started] (CAMEL-12197) Automatic discovery of LogListener and UuidGenerator

2018-01-26 Thread Luca Burgazzoli (JIRA)

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

Work on CAMEL-12197 started by Luca Burgazzoli.
---
> Automatic discovery of LogListener and UuidGenerator
> 
>
> Key: CAMEL-12197
> URL: https://issues.apache.org/jira/browse/CAMEL-12197
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-core-xml, camel-spring-boot
>Reporter: Luca Burgazzoli
>Assignee: Luca Burgazzoli
>Priority: Minor
> Fix For: 2.21.0
>
>
> It would be nice if  beans of type LogListener or UuidGenerator are 
> automatically discovered from the registry
> Impacts:
> - AbstractCamelContextFactoryBean
> - CamelAutoConfiguration



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (CAMEL-12197) Automatic discovery of LogListener and UuidGenerator

2018-01-26 Thread Luca Burgazzoli (JIRA)
Luca Burgazzoli created CAMEL-12197:
---

 Summary: Automatic discovery of LogListener and UuidGenerator
 Key: CAMEL-12197
 URL: https://issues.apache.org/jira/browse/CAMEL-12197
 Project: Camel
  Issue Type: Improvement
  Components: camel-core-xml, camel-spring-boot
Reporter: Luca Burgazzoli
Assignee: Luca Burgazzoli
 Fix For: 2.21.0


It would be nice if  beans of type LogListener or UuidGenerator are 
automatically discovered from the registry

Impacts:
- AbstractCamelContextFactoryBean
- CamelAutoConfiguration



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (CAMEL-12196) Mock endpoint - body().matches().simple - Does not work

2018-01-26 Thread Claus Ibsen (JIRA)
Claus Ibsen created CAMEL-12196:
---

 Summary: Mock endpoint - body().matches().simple - Does not work
 Key: CAMEL-12196
 URL: https://issues.apache.org/jira/browse/CAMEL-12196
 Project: Camel
  Issue Type: Bug
  Components: camel-core
Affects Versions: 2.20.1, 2.19.4
Reporter: Claus Ibsen
Assignee: Claus Ibsen
 Fix For: 2.19.5, 2.20.3, 2.21.0


Reported on gitter

https://gitter.im/apache/apache-camel?at=5a6604ab5ade18be39aa9ca7



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12184) EventNotifierSupport does not receive ExchangeSentEvents anymore

2018-01-26 Thread Pascal Schumacher (JIRA)

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

Pascal Schumacher commented on CAMEL-12184:
---

When I change the code as you suggested it works again (with Camel 2.20.2).

Thank you very much Claus!

> EventNotifierSupport does not receive ExchangeSentEvents anymore
> 
>
> Key: CAMEL-12184
> URL: https://issues.apache.org/jira/browse/CAMEL-12184
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.1
>Reporter: Pascal Schumacher
>Assignee: Claus Ibsen
>Priority: Minor
>  Labels: regression
> Fix For: 2.20.3, 2.21.0
>
>
> I'm using an {{EventNotifier}} with Camel Spring, which is basically a copy 
> of 
> [https://github.com/apache/camel/blob/f6ac3d81420d3f53b029a0f0c31dd4610810e2c2/camel-core/src/test/java/org/apache/camel/processor/MyLoggingSentEventNotifer.java]
> After upgrading to Camel 2.20.1 from 2.19.1 it does not receive 
> {{ExchangeSentEvents}} anymore. It is still picked up by Camel according to 
> the log: {{org.apache.camel.core.xml.AbstractCamelContextFactoryBean - Using 
> custom EventNotifier with id: myLoggingEventNotifier and implementation: 
> test.MyLoggingSentEventNotifer@5f7b97da}} and {{ExchangeCreatedEvents}}, 
> {{ExchangeSendingEvents}}, {{ExchangeCompletedEvents}} are received as 
> before. Only {{ExchangeSentEvents}} are missing.
> Complete example to reproduce this issue:
> {code:java|title=MyLoggingSentEventNotifer.java}
> public class MyLoggingSentEventNotifer extends EventNotifierSupport {
> public void notify(EventObject event) throws Exception {
> if (event instanceof ExchangeSentEvent) {
> ExchangeSentEvent sent = (ExchangeSentEvent) event;
> log.info("Took {} millis to send to: {}", sent.getTimeTaken(), 
> sent.getEndpoint());
> }
> }
> public boolean isEnabled(EventObject event) {
> return event instanceof ExchangeSentEvent;
> }
> protected void doStart() throws Exception {
> }
> protected void doStop() throws Exception {
> }
> }
> {code}
> {code:java|title=test-beans.xml}
> 
> http://www.springframework.org/schema/beans; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=" 
> http://www.springframework.org/schema/beans 
> http://www.springframework.org/schema/beans/spring-beans.xsd 
> http://camel.apache.org/schema/spring 
> http://camel.apache.org/schema/spring/camel-spring.xsd;> 
>  />
> http://camel.apache.org/schema/spring;>
> 
> 
> 
> 
> 
> 
> 
> 
> 1000
> 
> 
> 
> 
> {code}
> {code:java|title=EventNotifierExchangeSentExampleTest.java}
> @RunWith(CamelSpringRunner.class)
> @BootstrapWith(CamelTestContextBootstrapper.class)
> @ContextConfiguration(locations = {"classpath:/test-beans.xml"})
> public class EventNotifierExchangeSentExampleTest {
> @EndpointInject(uri = "direct:start")
> ProducerTemplate producer;
> @EndpointInject(uri = "mock:result")
> MockEndpoint out;
> @Test
> public void testExchangeSent() throws Exception {
> out.expectedMessageCount(1);
> producer.sendBody("Hello World");
> out.assertIsSatisfied();
> }
> }
> {code}
> {code:java|title=pom.xml}
> http://maven.apache.org/POM/4.0.0; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/xsd/maven-4.0.0.xsd;>
> 4.0.0
> com.test
> CamelSpringEventNotifierExchangeSentEventsBug
> 0.0.1-SNAPSHOT
> 
> 2.20.1
> 
> 
> 
> 
> org.apache.camel
> camel-spring
> ${camel.version}
> 
> 
> org.apache.camel
> camel-test-spring
> ${camel.version}
> 
> 
> ch.qos.logback
> logback-classic
> 1.2.2
> 
> 
> 
> 
> 
> org.apache.maven.plugins
> maven-compiler-plugin
> 3.7.0
> 
> 1.8
> 1.8
> 
> 
> 
> 
> 
> {code}
> Complete code on github: 
> [https://github.com/PascalSchumacher/CamelSpringEventNotifierExchangeSentEventsBug]
>   
>   



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12184) EventNotifierSupport does not receive ExchangeSentEvents anymore

2018-01-26 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-12184:
-

I updated the javadoc on these events to state about that they are a pair

> EventNotifierSupport does not receive ExchangeSentEvents anymore
> 
>
> Key: CAMEL-12184
> URL: https://issues.apache.org/jira/browse/CAMEL-12184
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.1
>Reporter: Pascal Schumacher
>Assignee: Claus Ibsen
>Priority: Minor
>  Labels: regression
> Fix For: 2.20.3, 2.21.0
>
>
> I'm using an {{EventNotifier}} with Camel Spring, which is basically a copy 
> of 
> [https://github.com/apache/camel/blob/f6ac3d81420d3f53b029a0f0c31dd4610810e2c2/camel-core/src/test/java/org/apache/camel/processor/MyLoggingSentEventNotifer.java]
> After upgrading to Camel 2.20.1 from 2.19.1 it does not receive 
> {{ExchangeSentEvents}} anymore. It is still picked up by Camel according to 
> the log: {{org.apache.camel.core.xml.AbstractCamelContextFactoryBean - Using 
> custom EventNotifier with id: myLoggingEventNotifier and implementation: 
> test.MyLoggingSentEventNotifer@5f7b97da}} and {{ExchangeCreatedEvents}}, 
> {{ExchangeSendingEvents}}, {{ExchangeCompletedEvents}} are received as 
> before. Only {{ExchangeSentEvents}} are missing.
> Complete example to reproduce this issue:
> {code:java|title=MyLoggingSentEventNotifer.java}
> public class MyLoggingSentEventNotifer extends EventNotifierSupport {
> public void notify(EventObject event) throws Exception {
> if (event instanceof ExchangeSentEvent) {
> ExchangeSentEvent sent = (ExchangeSentEvent) event;
> log.info("Took {} millis to send to: {}", sent.getTimeTaken(), 
> sent.getEndpoint());
> }
> }
> public boolean isEnabled(EventObject event) {
> return event instanceof ExchangeSentEvent;
> }
> protected void doStart() throws Exception {
> }
> protected void doStop() throws Exception {
> }
> }
> {code}
> {code:java|title=test-beans.xml}
> 
> http://www.springframework.org/schema/beans; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=" 
> http://www.springframework.org/schema/beans 
> http://www.springframework.org/schema/beans/spring-beans.xsd 
> http://camel.apache.org/schema/spring 
> http://camel.apache.org/schema/spring/camel-spring.xsd;> 
>  />
> http://camel.apache.org/schema/spring;>
> 
> 
> 
> 
> 
> 
> 
> 
> 1000
> 
> 
> 
> 
> {code}
> {code:java|title=EventNotifierExchangeSentExampleTest.java}
> @RunWith(CamelSpringRunner.class)
> @BootstrapWith(CamelTestContextBootstrapper.class)
> @ContextConfiguration(locations = {"classpath:/test-beans.xml"})
> public class EventNotifierExchangeSentExampleTest {
> @EndpointInject(uri = "direct:start")
> ProducerTemplate producer;
> @EndpointInject(uri = "mock:result")
> MockEndpoint out;
> @Test
> public void testExchangeSent() throws Exception {
> out.expectedMessageCount(1);
> producer.sendBody("Hello World");
> out.assertIsSatisfied();
> }
> }
> {code}
> {code:java|title=pom.xml}
> http://maven.apache.org/POM/4.0.0; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/xsd/maven-4.0.0.xsd;>
> 4.0.0
> com.test
> CamelSpringEventNotifierExchangeSentEventsBug
> 0.0.1-SNAPSHOT
> 
> 2.20.1
> 
> 
> 
> 
> org.apache.camel
> camel-spring
> ${camel.version}
> 
> 
> org.apache.camel
> camel-test-spring
> ${camel.version}
> 
> 
> ch.qos.logback
> logback-classic
> 1.2.2
> 
> 
> 
> 
> 
> org.apache.maven.plugins
> maven-compiler-plugin
> 3.7.0
> 
> 1.8
> 1.8
> 
> 
> 
> 
> 
> {code}
> Complete code on github: 
> [https://github.com/PascalSchumacher/CamelSpringEventNotifierExchangeSentEventsBug]
>   
>   



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12184) EventNotifierSupport does not receive ExchangeSentEvents anymore

2018-01-26 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-12184:
-

It just happens that camel-core testing has another event notifier enabled OOTB 
that would enable the sending|sent etc so it worked there, where as camel-test 
would not (its more scraped)

> EventNotifierSupport does not receive ExchangeSentEvents anymore
> 
>
> Key: CAMEL-12184
> URL: https://issues.apache.org/jira/browse/CAMEL-12184
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.1
>Reporter: Pascal Schumacher
>Assignee: Claus Ibsen
>Priority: Minor
>  Labels: regression
> Fix For: 2.20.3, 2.21.0
>
>
> I'm using an {{EventNotifier}} with Camel Spring, which is basically a copy 
> of 
> [https://github.com/apache/camel/blob/f6ac3d81420d3f53b029a0f0c31dd4610810e2c2/camel-core/src/test/java/org/apache/camel/processor/MyLoggingSentEventNotifer.java]
> After upgrading to Camel 2.20.1 from 2.19.1 it does not receive 
> {{ExchangeSentEvents}} anymore. It is still picked up by Camel according to 
> the log: {{org.apache.camel.core.xml.AbstractCamelContextFactoryBean - Using 
> custom EventNotifier with id: myLoggingEventNotifier and implementation: 
> test.MyLoggingSentEventNotifer@5f7b97da}} and {{ExchangeCreatedEvents}}, 
> {{ExchangeSendingEvents}}, {{ExchangeCompletedEvents}} are received as 
> before. Only {{ExchangeSentEvents}} are missing.
> Complete example to reproduce this issue:
> {code:java|title=MyLoggingSentEventNotifer.java}
> public class MyLoggingSentEventNotifer extends EventNotifierSupport {
> public void notify(EventObject event) throws Exception {
> if (event instanceof ExchangeSentEvent) {
> ExchangeSentEvent sent = (ExchangeSentEvent) event;
> log.info("Took {} millis to send to: {}", sent.getTimeTaken(), 
> sent.getEndpoint());
> }
> }
> public boolean isEnabled(EventObject event) {
> return event instanceof ExchangeSentEvent;
> }
> protected void doStart() throws Exception {
> }
> protected void doStop() throws Exception {
> }
> }
> {code}
> {code:java|title=test-beans.xml}
> 
> http://www.springframework.org/schema/beans; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=" 
> http://www.springframework.org/schema/beans 
> http://www.springframework.org/schema/beans/spring-beans.xsd 
> http://camel.apache.org/schema/spring 
> http://camel.apache.org/schema/spring/camel-spring.xsd;> 
>  />
> http://camel.apache.org/schema/spring;>
> 
> 
> 
> 
> 
> 
> 
> 
> 1000
> 
> 
> 
> 
> {code}
> {code:java|title=EventNotifierExchangeSentExampleTest.java}
> @RunWith(CamelSpringRunner.class)
> @BootstrapWith(CamelTestContextBootstrapper.class)
> @ContextConfiguration(locations = {"classpath:/test-beans.xml"})
> public class EventNotifierExchangeSentExampleTest {
> @EndpointInject(uri = "direct:start")
> ProducerTemplate producer;
> @EndpointInject(uri = "mock:result")
> MockEndpoint out;
> @Test
> public void testExchangeSent() throws Exception {
> out.expectedMessageCount(1);
> producer.sendBody("Hello World");
> out.assertIsSatisfied();
> }
> }
> {code}
> {code:java|title=pom.xml}
> http://maven.apache.org/POM/4.0.0; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/xsd/maven-4.0.0.xsd;>
> 4.0.0
> com.test
> CamelSpringEventNotifierExchangeSentEventsBug
> 0.0.1-SNAPSHOT
> 
> 2.20.1
> 
> 
> 
> 
> org.apache.camel
> camel-spring
> ${camel.version}
> 
> 
> org.apache.camel
> camel-test-spring
> ${camel.version}
> 
> 
> ch.qos.logback
> logback-classic
> 1.2.2
> 
> 
> 
> 
> 
> org.apache.maven.plugins
> maven-compiler-plugin
> 3.7.0
> 
> 1.8
> 1.8
> 
> 
> 
> 
> 
> {code}
> Complete code on github: 
> [https://github.com/PascalSchumacher/CamelSpringEventNotifierExchangeSentEventsBug]
>   
>   



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (CAMEL-12184) EventNotifierSupport does not receive ExchangeSentEvents anymore

2018-01-26 Thread Claus Ibsen (JIRA)

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

Claus Ibsen resolved CAMEL-12184.
-
Resolution: Not A Problem

Okay so Camel was optimised in 2.20 onwards. So in your event notifier class 
you should either return true to all isEnabled or also return true to sending 
|| sent as they come as a pair.

eg either
{code:java}
public boolean isEnabled(EventObject event) {
// we only want the sending/sent events  (they are a pair)
return event instanceof ExchangeSendingEvent || event instanceof 
ExchangeSentEvent;
}
{code}
or
{code:java}
public boolean isEnabled(EventObject event) {
return true;
}
{code}

> EventNotifierSupport does not receive ExchangeSentEvents anymore
> 
>
> Key: CAMEL-12184
> URL: https://issues.apache.org/jira/browse/CAMEL-12184
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.1
>Reporter: Pascal Schumacher
>Assignee: Claus Ibsen
>Priority: Minor
>  Labels: regression
> Fix For: 2.20.3, 2.21.0
>
>
> I'm using an {{EventNotifier}} with Camel Spring, which is basically a copy 
> of 
> [https://github.com/apache/camel/blob/f6ac3d81420d3f53b029a0f0c31dd4610810e2c2/camel-core/src/test/java/org/apache/camel/processor/MyLoggingSentEventNotifer.java]
> After upgrading to Camel 2.20.1 from 2.19.1 it does not receive 
> {{ExchangeSentEvents}} anymore. It is still picked up by Camel according to 
> the log: {{org.apache.camel.core.xml.AbstractCamelContextFactoryBean - Using 
> custom EventNotifier with id: myLoggingEventNotifier and implementation: 
> test.MyLoggingSentEventNotifer@5f7b97da}} and {{ExchangeCreatedEvents}}, 
> {{ExchangeSendingEvents}}, {{ExchangeCompletedEvents}} are received as 
> before. Only {{ExchangeSentEvents}} are missing.
> Complete example to reproduce this issue:
> {code:java|title=MyLoggingSentEventNotifer.java}
> public class MyLoggingSentEventNotifer extends EventNotifierSupport {
> public void notify(EventObject event) throws Exception {
> if (event instanceof ExchangeSentEvent) {
> ExchangeSentEvent sent = (ExchangeSentEvent) event;
> log.info("Took {} millis to send to: {}", sent.getTimeTaken(), 
> sent.getEndpoint());
> }
> }
> public boolean isEnabled(EventObject event) {
> return event instanceof ExchangeSentEvent;
> }
> protected void doStart() throws Exception {
> }
> protected void doStop() throws Exception {
> }
> }
> {code}
> {code:java|title=test-beans.xml}
> 
> http://www.springframework.org/schema/beans; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=" 
> http://www.springframework.org/schema/beans 
> http://www.springframework.org/schema/beans/spring-beans.xsd 
> http://camel.apache.org/schema/spring 
> http://camel.apache.org/schema/spring/camel-spring.xsd;> 
>  />
> http://camel.apache.org/schema/spring;>
> 
> 
> 
> 
> 
> 
> 
> 
> 1000
> 
> 
> 
> 
> {code}
> {code:java|title=EventNotifierExchangeSentExampleTest.java}
> @RunWith(CamelSpringRunner.class)
> @BootstrapWith(CamelTestContextBootstrapper.class)
> @ContextConfiguration(locations = {"classpath:/test-beans.xml"})
> public class EventNotifierExchangeSentExampleTest {
> @EndpointInject(uri = "direct:start")
> ProducerTemplate producer;
> @EndpointInject(uri = "mock:result")
> MockEndpoint out;
> @Test
> public void testExchangeSent() throws Exception {
> out.expectedMessageCount(1);
> producer.sendBody("Hello World");
> out.assertIsSatisfied();
> }
> }
> {code}
> {code:java|title=pom.xml}
> http://maven.apache.org/POM/4.0.0; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/xsd/maven-4.0.0.xsd;>
> 4.0.0
> com.test
> CamelSpringEventNotifierExchangeSentEventsBug
> 0.0.1-SNAPSHOT
> 
> 2.20.1
> 
> 
> 
> 
> org.apache.camel
> camel-spring
> ${camel.version}
> 
> 
> org.apache.camel
> camel-test-spring
> ${camel.version}
> 
> 
> ch.qos.logback
> logback-classic
> 1.2.2
> 
> 
> 
> 
> 
> org.apache.maven.plugins
> maven-compiler-plugin
> 3.7.0
> 
> 1.8
> 1.8
> 
> 
> 
> 
> 
> {code}
> Complete code on github: 
> 

[jira] [Commented] (CAMEL-12138) Expose Braintree Dispute API

2018-01-26 Thread Russ Johnson (JIRA)

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

Russ Johnson commented on CAMEL-12138:
--

At the moment, no, but some time within the next month or two I expect to. I am 
working on a project that will need this API exposed later this year.

> Expose Braintree Dispute API
> 
>
> Key: CAMEL-12138
> URL: https://issues.apache.org/jira/browse/CAMEL-12138
> Project: Camel
>  Issue Type: New Feature
>  Components: camel-braintree
>Reporter: Russ Johnson
>Priority: Major
> Fix For: 2.21.0
>
>
> Braintree's Dispute API, described here: 
> https://developers.braintreepayments.com/reference/response/dispute/java, is 
> not currently exposed in the Braintree Component.
> The intention of this ticket is to expose the Braintree Dispute API in the 
> Component.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Reopened] (CAMEL-12184) EventNotifierSupport does not receive ExchangeSentEvents anymore

2018-01-26 Thread Claus Ibsen (JIRA)

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

Claus Ibsen reopened CAMEL-12184:
-

Ah thanks, so it narrows it down to camel-test 

> EventNotifierSupport does not receive ExchangeSentEvents anymore
> 
>
> Key: CAMEL-12184
> URL: https://issues.apache.org/jira/browse/CAMEL-12184
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.1
>Reporter: Pascal Schumacher
>Assignee: Claus Ibsen
>Priority: Minor
>  Labels: regression
> Fix For: 2.20.3, 2.21.0
>
>
> I'm using an {{EventNotifier}} with Camel Spring, which is basically a copy 
> of 
> [https://github.com/apache/camel/blob/f6ac3d81420d3f53b029a0f0c31dd4610810e2c2/camel-core/src/test/java/org/apache/camel/processor/MyLoggingSentEventNotifer.java]
> After upgrading to Camel 2.20.1 from 2.19.1 it does not receive 
> {{ExchangeSentEvents}} anymore. It is still picked up by Camel according to 
> the log: {{org.apache.camel.core.xml.AbstractCamelContextFactoryBean - Using 
> custom EventNotifier with id: myLoggingEventNotifier and implementation: 
> test.MyLoggingSentEventNotifer@5f7b97da}} and {{ExchangeCreatedEvents}}, 
> {{ExchangeSendingEvents}}, {{ExchangeCompletedEvents}} are received as 
> before. Only {{ExchangeSentEvents}} are missing.
> Complete example to reproduce this issue:
> {code:java|title=MyLoggingSentEventNotifer.java}
> public class MyLoggingSentEventNotifer extends EventNotifierSupport {
> public void notify(EventObject event) throws Exception {
> if (event instanceof ExchangeSentEvent) {
> ExchangeSentEvent sent = (ExchangeSentEvent) event;
> log.info("Took {} millis to send to: {}", sent.getTimeTaken(), 
> sent.getEndpoint());
> }
> }
> public boolean isEnabled(EventObject event) {
> return event instanceof ExchangeSentEvent;
> }
> protected void doStart() throws Exception {
> }
> protected void doStop() throws Exception {
> }
> }
> {code}
> {code:java|title=test-beans.xml}
> 
> http://www.springframework.org/schema/beans; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=" 
> http://www.springframework.org/schema/beans 
> http://www.springframework.org/schema/beans/spring-beans.xsd 
> http://camel.apache.org/schema/spring 
> http://camel.apache.org/schema/spring/camel-spring.xsd;> 
>  />
> http://camel.apache.org/schema/spring;>
> 
> 
> 
> 
> 
> 
> 
> 
> 1000
> 
> 
> 
> 
> {code}
> {code:java|title=EventNotifierExchangeSentExampleTest.java}
> @RunWith(CamelSpringRunner.class)
> @BootstrapWith(CamelTestContextBootstrapper.class)
> @ContextConfiguration(locations = {"classpath:/test-beans.xml"})
> public class EventNotifierExchangeSentExampleTest {
> @EndpointInject(uri = "direct:start")
> ProducerTemplate producer;
> @EndpointInject(uri = "mock:result")
> MockEndpoint out;
> @Test
> public void testExchangeSent() throws Exception {
> out.expectedMessageCount(1);
> producer.sendBody("Hello World");
> out.assertIsSatisfied();
> }
> }
> {code}
> {code:java|title=pom.xml}
> http://maven.apache.org/POM/4.0.0; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/xsd/maven-4.0.0.xsd;>
> 4.0.0
> com.test
> CamelSpringEventNotifierExchangeSentEventsBug
> 0.0.1-SNAPSHOT
> 
> 2.20.1
> 
> 
> 
> 
> org.apache.camel
> camel-spring
> ${camel.version}
> 
> 
> org.apache.camel
> camel-test-spring
> ${camel.version}
> 
> 
> ch.qos.logback
> logback-classic
> 1.2.2
> 
> 
> 
> 
> 
> org.apache.maven.plugins
> maven-compiler-plugin
> 3.7.0
> 
> 1.8
> 1.8
> 
> 
> 
> 
> 
> {code}
> Complete code on github: 
> [https://github.com/PascalSchumacher/CamelSpringEventNotifierExchangeSentEventsBug]
>   
>   



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)