You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2013/11/05 12:01:40 UTC
[1/3] git commit: Added some logging when reply manager is being
stopped so its easier to pair the start/stop logs.
Updated Branches:
refs/heads/master 94f5dcbe5 -> 0b3a9b759
Added some logging when reply manager is being stopped so its easier to pair the start/stop logs.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0b3a9b75
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0b3a9b75
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0b3a9b75
Branch: refs/heads/master
Commit: 0b3a9b75994ecc59d895dcfa94adc63093fef4d1
Parents: 5765ca6
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Nov 5 11:58:37 2013 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Nov 5 12:02:11 2013 +0100
----------------------------------------------------------------------
.../java/org/apache/camel/component/jms/JmsProducer.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/0b3a9b75/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java
index 3af7aab..096df8c 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsProducer.java
@@ -117,7 +117,13 @@ public class JmsProducer extends DefaultAsyncProducer {
protected void unInitReplyManager() {
try {
- ServiceHelper.stopService(replyManager);
+ if (replyManager != null) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Stopping JmsReplyManager: {} from processing replies from: {}", replyManager,
+ endpoint.getReplyTo() != null ? endpoint.getReplyTo() : "temporary queue");
+ }
+ ServiceHelper.stopService(replyManager);
+ }
} catch (Exception e) {
throw ObjectHelper.wrapRuntimeCamelException(e);
} finally {
[3/3] git commit: Added unit test based on user forum issue
Posted by da...@apache.org.
Added unit test based on user forum issue
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0450fa24
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0450fa24
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0450fa24
Branch: refs/heads/master
Commit: 0450fa24ab4acd38b394d6d90d910e2121a8a28e
Parents: 94f5dcb
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Nov 5 11:29:34 2013 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Nov 5 12:02:11 2013 +0100
----------------------------------------------------------------------
...ExceptionAndRollbackUsingTransactedTest.java | 32 ++++++++
...pedOnExceptionAndRollbackUsingTransacted.xml | 79 ++++++++++++++++++++
2 files changed, 111 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/0450fa24/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/SpringTransactionalClientDataWithRouteScopedOnExceptionAndRollbackUsingTransactedTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/SpringTransactionalClientDataWithRouteScopedOnExceptionAndRollbackUsingTransactedTest.java b/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/SpringTransactionalClientDataWithRouteScopedOnExceptionAndRollbackUsingTransactedTest.java
new file mode 100644
index 0000000..9a9a4d6
--- /dev/null
+++ b/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/SpringTransactionalClientDataWithRouteScopedOnExceptionAndRollbackUsingTransactedTest.java
@@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.spring.interceptor;
+
+import org.springframework.context.support.AbstractXmlApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * Easier transaction configuration as we do not have to setup a transaction error handler
+ */
+public class SpringTransactionalClientDataWithRouteScopedOnExceptionAndRollbackUsingTransactedTest extends SpringTransactionalClientDataWithOnExceptionAndRollbackUsingTransactedTest {
+
+ protected AbstractXmlApplicationContext createApplicationContext() {
+ return new ClassPathXmlApplicationContext(
+ "/org/apache/camel/spring/interceptor/springTransactionalClientDataWithRouteScopedOnExceptionAndRollbackUsingTransacted.xml");
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/0450fa24/components/camel-spring/src/test/resources/org/apache/camel/spring/interceptor/springTransactionalClientDataWithRouteScopedOnExceptionAndRollbackUsingTransacted.xml
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/test/resources/org/apache/camel/spring/interceptor/springTransactionalClientDataWithRouteScopedOnExceptionAndRollbackUsingTransacted.xml b/components/camel-spring/src/test/resources/org/apache/camel/spring/interceptor/springTransactionalClientDataWithRouteScopedOnExceptionAndRollbackUsingTransacted.xml
new file mode 100644
index 0000000..b7986db
--- /dev/null
+++ b/components/camel-spring/src/test/resources/org/apache/camel/spring/interceptor/springTransactionalClientDataWithRouteScopedOnExceptionAndRollbackUsingTransacted.xml
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<beans xmlns="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">
+
+ <import resource="transactionalClientDataSource.xml"/>
+
+ <!-- START SNIPPET: e1 -->
+ <camelContext xmlns="http://camel.apache.org/schema/spring">
+
+ <route>
+ <from uri="direct:okay"/>
+ <transacted/>
+ <onException>
+ <exception>java.lang.IllegalArgumentException</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to uri="mock:error"/>
+ <transform>
+ <constant>Sorry</constant>
+ </transform>
+ <rollback markRollbackOnly="true"/>
+ </onException>
+ <setBody>
+ <constant>Tiger in Action</constant>
+ </setBody>
+ <bean ref="bookService"/>
+ <setBody>
+ <constant>Elephant in Action</constant>
+ </setBody>
+ <bean ref="bookService"/>
+ </route>
+
+ <route>
+ <from uri="direct:fail"/>
+ <transacted/>
+ <onException>
+ <exception>java.lang.IllegalArgumentException</exception>
+ <handled>
+ <constant>true</constant>
+ </handled>
+ <to uri="mock:error"/>
+ <transform>
+ <constant>Sorry</constant>
+ </transform>
+ <rollback markRollbackOnly="true"/>
+ </onException>
+ <setBody>
+ <constant>Tiger in Action</constant>
+ </setBody>
+ <bean ref="bookService"/>
+ <setBody>
+ <constant>Donkey in Action</constant>
+ </setBody>
+ <bean ref="bookService"/>
+ </route>
+ </camelContext>
+ <!-- END SNIPPET: e1 -->
+
+</beans>
[2/3] git commit: Fixed spelling mistake
Posted by da...@apache.org.
Fixed spelling mistake
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5765ca64
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5765ca64
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5765ca64
Branch: refs/heads/master
Commit: 5765ca64845d2ed55bda2907e7c62df9d48fc4fa
Parents: 0450fa2
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Nov 5 11:47:40 2013 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Nov 5 12:02:11 2013 +0100
----------------------------------------------------------------------
.../src/main/java/org/apache/camel/component/jms/JmsConsumer.java | 2 +-
.../src/main/java/org/apache/camel/component/jms/JmsEndpoint.java | 2 +-
.../org/apache/camel/component/jms/reply/ReplyManagerSupport.java | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/5765ca64/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConsumer.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConsumer.java
index 7bf6ab5..87f39fa 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConsumer.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConsumer.java
@@ -178,7 +178,7 @@ public class JmsConsumer extends DefaultConsumer implements SuspendableService {
listenerContainer.stop();
listenerContainer.destroy();
} finally {
- getEndpoint().onListenerConstainerStopped(listenerContainer);
+ getEndpoint().onListenerContainerStopped(listenerContainer);
}
}
// null container and listener so they are fully re created if this consumer is restarted
http://git-wip-us.apache.org/repos/asf/camel/blob/5765ca64/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
index 4f5ea57..17204b5 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
@@ -441,7 +441,7 @@ public class JmsEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
runningMessageListeners.incrementAndGet();
}
- public void onListenerConstainerStopped(AbstractMessageListenerContainer container) {
+ public void onListenerContainerStopped(AbstractMessageListenerContainer container) {
runningMessageListeners.decrementAndGet();
}
http://git-wip-us.apache.org/repos/asf/camel/blob/5765ca64/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java
index 173d9c8..a93a36b 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/ReplyManagerSupport.java
@@ -239,7 +239,7 @@ public abstract class ReplyManagerSupport extends ServiceSupport implements Repl
listenerContainer.stop();
listenerContainer.destroy();
} finally {
- endpoint.onListenerConstainerStopped(listenerContainer);
+ endpoint.onListenerContainerStopped(listenerContainer);
listenerContainer = null;
}
}