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/08/31 12:56:28 UTC
[1/9] git commit: CAMEL-6692: JMS now also enlists topic destinations
as managed endpoints in JMX
Updated Branches:
refs/heads/camel-2.11.x bbab8282c -> f4fdeb1aa
refs/heads/camel-2.12.x 2e21ec701 -> d8a89413b
refs/heads/master c306cd2ff -> 71dd1a632
CAMEL-6692: JMS now also enlists topic destinations as managed endpoints in JMX
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/05d9afb1
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/05d9afb1
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/05d9afb1
Branch: refs/heads/master
Commit: 05d9afb1846664acce7e363bb28db8c56e57c3f9
Parents: c306cd2
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Aug 31 12:14:39 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Aug 31 12:14:39 2013 +0200
----------------------------------------------------------------------
.../apache/camel/component/jms/JmsEndpoint.java | 6 --
.../component/jms/ManagedJmsEndpointTest.java | 3 +
.../jms/ManagedJmsEndpointTopicTest.java | 92 ++++++++++++++++++++
3 files changed, 95 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/05d9afb1/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 664da7c..b3e5ab5 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
@@ -379,12 +379,6 @@ public class JmsEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
@ManagedAttribute
public boolean isSingleton() {
- if (isPubSubDomain()) {
- // topic cannot be singleton, as there may be multiple consumers
- // on the same topic
- return false;
- }
- // but queues can be singleton
return true;
}
http://git-wip-us.apache.org/repos/asf/camel/blob/05d9afb1/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTest.java b/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTest.java
index f3e15a0..08d82a5 100644
--- a/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTest.java
+++ b/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTest.java
@@ -66,6 +66,9 @@ public class ManagedJmsEndpointTest extends CamelTestSupport {
Boolean singleton = (Boolean) mbeanServer.getAttribute(name, "Singleton");
assertTrue(singleton.booleanValue());
+ Integer running = (Integer) mbeanServer.getAttribute(name, "RunningMessageListeners");
+ assertEquals(1, running.intValue());
+
Long size = (Long) mbeanServer.invoke(name, "queueSize", null, null);
assertEquals(0, size.intValue());
http://git-wip-us.apache.org/repos/asf/camel/blob/05d9afb1/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTopicTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTopicTest.java b/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTopicTest.java
new file mode 100644
index 0000000..81cd70c
--- /dev/null
+++ b/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTopicTest.java
@@ -0,0 +1,92 @@
+/**
+ * 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.component.jms;
+
+import javax.jms.ConnectionFactory;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.management.DefaultManagementNamingStrategy;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+import static org.apache.camel.component.jms.JmsComponent.jmsComponentAutoAcknowledge;
+
+/**
+ *
+ */
+public class ManagedJmsEndpointTopicTest extends CamelTestSupport {
+
+ @Override
+ protected boolean useJmx() {
+ return true;
+ }
+
+ protected CamelContext createCamelContext() throws Exception {
+ CamelContext context = new DefaultCamelContext();
+ DefaultManagementNamingStrategy naming = (DefaultManagementNamingStrategy) context.getManagementStrategy().getManagementNamingStrategy();
+ naming.setHostName("localhost");
+ naming.setDomainName("org.apache.camel");
+
+ ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
+ context.addComponent("activemq", jmsComponentAutoAcknowledge(connectionFactory));
+
+ return context;
+ }
+
+ protected MBeanServer getMBeanServer() {
+ return context.getManagementStrategy().getManagementAgent().getMBeanServer();
+ }
+
+ @Test
+ public void testJmsEndpoint() throws Exception {
+ MBeanServer mbeanServer = getMBeanServer();
+
+ ObjectName name = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=endpoints,name=\"activemq://topic:start\"");
+ String uri = (String) mbeanServer.getAttribute(name, "EndpointUri");
+ assertEquals("activemq://topic:start", uri);
+
+ Boolean singleton = (Boolean) mbeanServer.getAttribute(name, "Singleton");
+ assertTrue(singleton.booleanValue());
+
+ Integer running = (Integer) mbeanServer.getAttribute(name, "RunningMessageListeners");
+ assertEquals(2, running.intValue());
+
+ getMockEndpoint("mock:result").expectedMessageCount(2);
+
+ template.sendBody("activemq:topic:start", "Hello World");
+
+ assertMockEndpointsSatisfied();
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ from("activemq:topic:start").routeId("foo").to("log:foo").to("mock:result");
+
+ from("activemq:topic:start").routeId("bar").to("log:bar").to("mock:result");
+ }
+ };
+ }
+
+
+}
[3/9] git commit: CAMEL-6692: JMS now also enlists topic destinations
as managed endpoints in JMX
Posted by da...@apache.org.
CAMEL-6692: JMS now also enlists topic destinations as managed endpoints in JMX
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4f91442e
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4f91442e
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4f91442e
Branch: refs/heads/master
Commit: 4f91442ecc90457ef7d46e1d5b631fc272e11c57
Parents: 7204078
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Aug 31 12:25:17 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Aug 31 12:25:17 2013 +0200
----------------------------------------------------------------------
.../src/main/java/org/apache/camel/component/jms/JmsEndpoint.java | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/4f91442e/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 b3e5ab5..322ca6b 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
@@ -382,6 +382,7 @@ public class JmsEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
return true;
}
+ @ManagedAttribute
public boolean isPubSubDomain() {
return pubSubDomain;
}
[5/9] git commit: CAMEL-6691: Fixed seda when using queueSize not
comparing correctly.
Posted by da...@apache.org.
CAMEL-6691: Fixed seda when using queueSize not comparing correctly.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/2e64834b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2e64834b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2e64834b
Branch: refs/heads/camel-2.12.x
Commit: 2e64834b96111fb5691de08dd59e0f7aa5433326
Parents: d78ee9e
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Aug 31 12:17:04 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Aug 31 12:52:57 2013 +0200
----------------------------------------------------------------------
.../main/java/org/apache/camel/component/seda/SedaComponent.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/2e64834b/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java b/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
index 94623f8..74e6278 100644
--- a/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
@@ -89,7 +89,7 @@ public class SedaComponent extends UriEndpointComponent {
if (ref != null) {
// if the given size is not provided, we just use the existing queue as is
- if (size != null && ref.getSize() != size) {
+ if (size != null && !size.equals(ref.getSize())) {
// there is already a queue, so make sure the size matches
throw new IllegalArgumentException("Cannot use existing queue " + key + " as the existing queue size "
+ (ref.getSize() != null ? ref.getSize() : Integer.MAX_VALUE) + " does not match given queue size " + size);
[4/9] git commit: CAMEL-6692: JMS now also enlists topic destinations
as managed endpoints in JMX
Posted by da...@apache.org.
CAMEL-6692: JMS now also enlists topic destinations as managed endpoints in JMX
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d78ee9e5
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d78ee9e5
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d78ee9e5
Branch: refs/heads/camel-2.12.x
Commit: d78ee9e58d9e6a4a280b6c71733600bcc2da8a71
Parents: 2e21ec7
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Aug 31 12:14:39 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Aug 31 12:52:48 2013 +0200
----------------------------------------------------------------------
.../apache/camel/component/jms/JmsEndpoint.java | 6 --
.../component/jms/ManagedJmsEndpointTest.java | 3 +
.../jms/ManagedJmsEndpointTopicTest.java | 92 ++++++++++++++++++++
3 files changed, 95 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/d78ee9e5/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 664da7c..b3e5ab5 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
@@ -379,12 +379,6 @@ public class JmsEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
@ManagedAttribute
public boolean isSingleton() {
- if (isPubSubDomain()) {
- // topic cannot be singleton, as there may be multiple consumers
- // on the same topic
- return false;
- }
- // but queues can be singleton
return true;
}
http://git-wip-us.apache.org/repos/asf/camel/blob/d78ee9e5/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTest.java b/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTest.java
index f3e15a0..08d82a5 100644
--- a/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTest.java
+++ b/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTest.java
@@ -66,6 +66,9 @@ public class ManagedJmsEndpointTest extends CamelTestSupport {
Boolean singleton = (Boolean) mbeanServer.getAttribute(name, "Singleton");
assertTrue(singleton.booleanValue());
+ Integer running = (Integer) mbeanServer.getAttribute(name, "RunningMessageListeners");
+ assertEquals(1, running.intValue());
+
Long size = (Long) mbeanServer.invoke(name, "queueSize", null, null);
assertEquals(0, size.intValue());
http://git-wip-us.apache.org/repos/asf/camel/blob/d78ee9e5/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTopicTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTopicTest.java b/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTopicTest.java
new file mode 100644
index 0000000..81cd70c
--- /dev/null
+++ b/components/camel-jms/src/test/java/org/apache/camel/component/jms/ManagedJmsEndpointTopicTest.java
@@ -0,0 +1,92 @@
+/**
+ * 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.component.jms;
+
+import javax.jms.ConnectionFactory;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.management.DefaultManagementNamingStrategy;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+import static org.apache.camel.component.jms.JmsComponent.jmsComponentAutoAcknowledge;
+
+/**
+ *
+ */
+public class ManagedJmsEndpointTopicTest extends CamelTestSupport {
+
+ @Override
+ protected boolean useJmx() {
+ return true;
+ }
+
+ protected CamelContext createCamelContext() throws Exception {
+ CamelContext context = new DefaultCamelContext();
+ DefaultManagementNamingStrategy naming = (DefaultManagementNamingStrategy) context.getManagementStrategy().getManagementNamingStrategy();
+ naming.setHostName("localhost");
+ naming.setDomainName("org.apache.camel");
+
+ ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
+ context.addComponent("activemq", jmsComponentAutoAcknowledge(connectionFactory));
+
+ return context;
+ }
+
+ protected MBeanServer getMBeanServer() {
+ return context.getManagementStrategy().getManagementAgent().getMBeanServer();
+ }
+
+ @Test
+ public void testJmsEndpoint() throws Exception {
+ MBeanServer mbeanServer = getMBeanServer();
+
+ ObjectName name = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=endpoints,name=\"activemq://topic:start\"");
+ String uri = (String) mbeanServer.getAttribute(name, "EndpointUri");
+ assertEquals("activemq://topic:start", uri);
+
+ Boolean singleton = (Boolean) mbeanServer.getAttribute(name, "Singleton");
+ assertTrue(singleton.booleanValue());
+
+ Integer running = (Integer) mbeanServer.getAttribute(name, "RunningMessageListeners");
+ assertEquals(2, running.intValue());
+
+ getMockEndpoint("mock:result").expectedMessageCount(2);
+
+ template.sendBody("activemq:topic:start", "Hello World");
+
+ assertMockEndpointsSatisfied();
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ from("activemq:topic:start").routeId("foo").to("log:foo").to("mock:result");
+
+ from("activemq:topic:start").routeId("bar").to("log:bar").to("mock:result");
+ }
+ };
+ }
+
+
+}
[2/9] git commit: CAMEL-6691: Fixed seda when using queueSize not
comparing correctly.
Posted by da...@apache.org.
CAMEL-6691: Fixed seda when using queueSize not comparing correctly.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/7204078a
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7204078a
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7204078a
Branch: refs/heads/master
Commit: 7204078a56ace4205c380ee019add3c4a9c2f30d
Parents: 05d9afb
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Aug 31 12:17:04 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Aug 31 12:24:28 2013 +0200
----------------------------------------------------------------------
.../main/java/org/apache/camel/component/seda/SedaComponent.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/7204078a/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java b/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
index 94623f8..74e6278 100644
--- a/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
@@ -89,7 +89,7 @@ public class SedaComponent extends UriEndpointComponent {
if (ref != null) {
// if the given size is not provided, we just use the existing queue as is
- if (size != null && ref.getSize() != size) {
+ if (size != null && !size.equals(ref.getSize())) {
// there is already a queue, so make sure the size matches
throw new IllegalArgumentException("Cannot use existing queue " + key + " as the existing queue size "
+ (ref.getSize() != null ? ref.getSize() : Integer.MAX_VALUE) + " does not match given queue size " + size);
[7/9] git commit: CAMEL-6691: Fixed seda when using queueSize not
comparing correctly.
Posted by da...@apache.org.
CAMEL-6691: Fixed seda when using queueSize not comparing correctly.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f4fdeb1a
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f4fdeb1a
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f4fdeb1a
Branch: refs/heads/camel-2.11.x
Commit: f4fdeb1aaaa38d068381544388d81bf4325b98ea
Parents: bbab828
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Aug 31 12:17:04 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Aug 31 12:53:18 2013 +0200
----------------------------------------------------------------------
.../main/java/org/apache/camel/component/seda/SedaComponent.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/f4fdeb1a/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java b/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
index 7528fa8..2d1d4d4 100644
--- a/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
@@ -71,7 +71,7 @@ public class SedaComponent extends DefaultComponent {
if (ref != null) {
// if the given size is not provided, we just use the existing queue as is
- if (size != null && ref.getSize() != size) {
+ if (size != null && !size.equals(ref.getSize())) {
// there is already a queue, so make sure the size matches
throw new IllegalArgumentException("Cannot use existing queue " + key + " as the existing queue size "
+ (ref.getSize() != null ? ref.getSize() : Integer.MAX_VALUE) + " does not match given queue size " + size);
[9/9] git commit: Polished
Posted by da...@apache.org.
Polished
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d8a89413
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d8a89413
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d8a89413
Branch: refs/heads/camel-2.12.x
Commit: d8a89413ba4d25d90c7f2acd870c34bb56fd6f0b
Parents: d398b87
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Aug 31 12:55:45 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Aug 31 12:56:07 2013 +0200
----------------------------------------------------------------------
.../org/apache/camel/component/seda/SedaComponent.java | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/d8a89413/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java b/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
index 74e6278..ce08856d 100644
--- a/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
@@ -39,6 +39,7 @@ public class SedaComponent extends UriEndpointComponent {
protected int defaultConcurrentConsumers = 1;
private final Map<String, QueueReference> queues = new HashMap<String, QueueReference>();
private BlockingQueueFactory<Exchange> defaultQueueFactory = new LinkedBlockingQueueFactory<Exchange>();
+
public SedaComponent() {
super(SedaEndpoint.class);
}
@@ -157,16 +158,12 @@ public class SedaComponent extends UriEndpointComponent {
+ maxConcurrentConsumers + " was " + consumers);
}
// Resolve queue reference
- BlockingQueue<Exchange> queue = resolveAndRemoveReferenceParameter(parameters, "queue",
- BlockingQueue.class);
+ BlockingQueue<Exchange> queue = resolveAndRemoveReferenceParameter(parameters, "queue", BlockingQueue.class);
SedaEndpoint answer;
// Resolve queue factory when no queue specified
if (queue == null) {
- BlockingQueueFactory<Exchange> queueFactory = resolveAndRemoveReferenceParameter(parameters,
- "queueFactory",
- BlockingQueueFactory.class);
- // defer creating queue till endpoint is started, so we pass the
- // queue factory
+ BlockingQueueFactory<Exchange> queueFactory = resolveAndRemoveReferenceParameter(parameters, "queueFactory", BlockingQueueFactory.class);
+ // defer creating queue till endpoint is started, so we pass the queue factory
answer = new SedaEndpoint(uri, this, queueFactory, consumers);
} else {
answer = new SedaEndpoint(uri, this, queue, consumers);
@@ -205,7 +202,6 @@ public class SedaComponent extends UriEndpointComponent {
// reference no longer needed so remove from queues
getQueues().remove(key);
}
-
}
}
[8/9] git commit: Polished
Posted by da...@apache.org.
Polished
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/71dd1a63
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/71dd1a63
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/71dd1a63
Branch: refs/heads/master
Commit: 71dd1a63297fc813ac5d518a006792e497ff8915
Parents: 4f91442
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Aug 31 12:55:45 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Aug 31 12:55:45 2013 +0200
----------------------------------------------------------------------
.../org/apache/camel/component/seda/SedaComponent.java | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/71dd1a63/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java b/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
index 74e6278..ce08856d 100644
--- a/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/component/seda/SedaComponent.java
@@ -39,6 +39,7 @@ public class SedaComponent extends UriEndpointComponent {
protected int defaultConcurrentConsumers = 1;
private final Map<String, QueueReference> queues = new HashMap<String, QueueReference>();
private BlockingQueueFactory<Exchange> defaultQueueFactory = new LinkedBlockingQueueFactory<Exchange>();
+
public SedaComponent() {
super(SedaEndpoint.class);
}
@@ -157,16 +158,12 @@ public class SedaComponent extends UriEndpointComponent {
+ maxConcurrentConsumers + " was " + consumers);
}
// Resolve queue reference
- BlockingQueue<Exchange> queue = resolveAndRemoveReferenceParameter(parameters, "queue",
- BlockingQueue.class);
+ BlockingQueue<Exchange> queue = resolveAndRemoveReferenceParameter(parameters, "queue", BlockingQueue.class);
SedaEndpoint answer;
// Resolve queue factory when no queue specified
if (queue == null) {
- BlockingQueueFactory<Exchange> queueFactory = resolveAndRemoveReferenceParameter(parameters,
- "queueFactory",
- BlockingQueueFactory.class);
- // defer creating queue till endpoint is started, so we pass the
- // queue factory
+ BlockingQueueFactory<Exchange> queueFactory = resolveAndRemoveReferenceParameter(parameters, "queueFactory", BlockingQueueFactory.class);
+ // defer creating queue till endpoint is started, so we pass the queue factory
answer = new SedaEndpoint(uri, this, queueFactory, consumers);
} else {
answer = new SedaEndpoint(uri, this, queue, consumers);
@@ -205,7 +202,6 @@ public class SedaComponent extends UriEndpointComponent {
// reference no longer needed so remove from queues
getQueues().remove(key);
}
-
}
}
[6/9] git commit: CAMEL-6692: JMS now also enlists topic destinations
as managed endpoints in JMX
Posted by da...@apache.org.
CAMEL-6692: JMS now also enlists topic destinations as managed endpoints in JMX
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d398b87c
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d398b87c
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d398b87c
Branch: refs/heads/camel-2.12.x
Commit: d398b87c681167d1cf04e0a297c30bddef6aecbc
Parents: 2e64834
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Aug 31 12:25:17 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Aug 31 12:53:04 2013 +0200
----------------------------------------------------------------------
.../src/main/java/org/apache/camel/component/jms/JmsEndpoint.java | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/d398b87c/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 b3e5ab5..322ca6b 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
@@ -382,6 +382,7 @@ public class JmsEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
return true;
}
+ @ManagedAttribute
public boolean isPubSubDomain() {
return pubSubDomain;
}