activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject activemq git commit: AMQ-5657: Upgrade to Camel 2.15.0
Date Wed, 11 Mar 2015 09:05:01 GMT
Repository: activemq
Updated Branches:
  refs/heads/trunk [created] 0aaee2c1c


AMQ-5657: Upgrade to Camel 2.15.0


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/0aaee2c1
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/0aaee2c1
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/0aaee2c1

Branch: refs/heads/trunk
Commit: 0aaee2c1c21923aac7d4b06087f0f00538f5182a
Parents: f91abd3
Author: Claus Ibsen <claus.ibsen@gmail.com>
Authored: Wed Mar 11 10:00:46 2015 +0100
Committer: Claus Ibsen <claus.ibsen@gmail.com>
Committed: Wed Mar 11 10:00:46 2015 +0100

----------------------------------------------------------------------
 activemq-camel/pom.xml                          |  6 ++++-
 .../camel/component/broker/BrokerComponent.java |  2 +-
 .../component/broker/BrokerConfiguration.java   |  5 ++++
 .../camel/component/broker/BrokerEndpoint.java  | 25 ++++++++++++++------
 pom.xml                                         |  4 ++--
 5 files changed, 31 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/0aaee2c1/activemq-camel/pom.xml
----------------------------------------------------------------------
diff --git a/activemq-camel/pom.xml b/activemq-camel/pom.xml
index 5ed94ff..41221cd 100755
--- a/activemq-camel/pom.xml
+++ b/activemq-camel/pom.xml
@@ -32,7 +32,7 @@
 
   <properties>
     <activemq.osgi.import.pkg>
-       org.springframework.jms*;version="[3,4)",
+       org.springframework.jms*;version="[3,5)",
        org.apache.activemq.pool,
        org.apache.camel*;version="${camel-version-range}",
        *
@@ -40,6 +40,10 @@
     <activemq.osgi.export>
         org.apache.activemq.camel*;version:="${project.version}";-noimport:=true
     </activemq.osgi.export>
+    <camel.osgi.export.service>
+      org.apache.camel.spi.ComponentResolver;component=activemq,
+      org.apache.camel.spi.ComponentResolver;component=broker
+    </camel.osgi.export.service>
   </properties>
 
   <dependencies>

http://git-wip-us.apache.org/repos/asf/activemq/blob/0aaee2c1/activemq-camel/src/main/java/org/apache/activemq/camel/component/broker/BrokerComponent.java
----------------------------------------------------------------------
diff --git a/activemq-camel/src/main/java/org/apache/activemq/camel/component/broker/BrokerComponent.java
b/activemq-camel/src/main/java/org/apache/activemq/camel/component/broker/BrokerComponent.java
index ea31f30..c300361 100644
--- a/activemq-camel/src/main/java/org/apache/activemq/camel/component/broker/BrokerComponent.java
+++ b/activemq-camel/src/main/java/org/apache/activemq/camel/component/broker/BrokerComponent.java
@@ -63,7 +63,7 @@ public class BrokerComponent extends UriEndpointComponent implements EndpointCom
         }
 
         ActiveMQDestination destination = ActiveMQDestination.createDestination(remaining,
destinationType);
-        BrokerEndpoint brokerEndpoint = new BrokerEndpoint(uri, this, destination, brokerConfiguration);
+        BrokerEndpoint brokerEndpoint = new BrokerEndpoint(uri, this, remaining, destination,
brokerConfiguration);
         setProperties(brokerEndpoint, parameters);
         return brokerEndpoint;
     }

http://git-wip-us.apache.org/repos/asf/activemq/blob/0aaee2c1/activemq-camel/src/main/java/org/apache/activemq/camel/component/broker/BrokerConfiguration.java
----------------------------------------------------------------------
diff --git a/activemq-camel/src/main/java/org/apache/activemq/camel/component/broker/BrokerConfiguration.java
b/activemq-camel/src/main/java/org/apache/activemq/camel/component/broker/BrokerConfiguration.java
index 6609533..f522f9b 100644
--- a/activemq-camel/src/main/java/org/apache/activemq/camel/component/broker/BrokerConfiguration.java
+++ b/activemq-camel/src/main/java/org/apache/activemq/camel/component/broker/BrokerConfiguration.java
@@ -17,7 +17,9 @@
 package org.apache.activemq.camel.component.broker;
 
 import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
 
+@UriParams
 public class BrokerConfiguration {
 
     @UriParam
@@ -27,6 +29,9 @@ public class BrokerConfiguration {
         return brokerName;
     }
 
+    /**
+     * Name of the broker
+     */
     public void setBrokerName(String brokerName) {
         this.brokerName = brokerName;
     }

http://git-wip-us.apache.org/repos/asf/activemq/blob/0aaee2c1/activemq-camel/src/main/java/org/apache/activemq/camel/component/broker/BrokerEndpoint.java
----------------------------------------------------------------------
diff --git a/activemq-camel/src/main/java/org/apache/activemq/camel/component/broker/BrokerEndpoint.java
b/activemq-camel/src/main/java/org/apache/activemq/camel/component/broker/BrokerEndpoint.java
index 55e7f7b..7a10c95 100644
--- a/activemq-camel/src/main/java/org/apache/activemq/camel/component/broker/BrokerEndpoint.java
+++ b/activemq-camel/src/main/java/org/apache/activemq/camel/component/broker/BrokerEndpoint.java
@@ -31,26 +31,30 @@ import org.apache.camel.Producer;
 import org.apache.camel.Service;
 import org.apache.camel.api.management.ManagedResource;
 import org.apache.camel.impl.DefaultEndpoint;
+import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriPath;
 import org.apache.camel.util.UnsafeUriCharactersEncoder;
 
 @ManagedResource(description = "Managed Camel Broker Endpoint")
-@UriEndpoint(scheme = "broker", consumerClass = BrokerConsumer.class)
+@UriEndpoint(scheme = "broker", consumerClass = BrokerConsumer.class, syntax = "broker:destination",
label = "messaging")
 public class BrokerEndpoint extends DefaultEndpoint implements MultipleConsumersSupport,
Service {
 
     static final String PRODUCER_BROKER_EXCHANGE = "producerBrokerExchange";
 
-    @UriParam
-    private final BrokerConfiguration configuration;
     private MessageInterceptorRegistry messageInterceptorRegistry;
-    @UriPath
-    private final ActiveMQDestination destination;
     private List<MessageInterceptor> messageInterceptorList = new CopyOnWriteArrayList<MessageInterceptor>();
 
-    public BrokerEndpoint(String uri, BrokerComponent component, ActiveMQDestination destination,
BrokerConfiguration configuration) {
+    @UriPath(name = "destination") @Metadata(required = "true")
+    private String destinationName;
+    private final ActiveMQDestination destination;
+    @UriParam
+    private final BrokerConfiguration configuration;
+
+    public BrokerEndpoint(String uri, BrokerComponent component, String destinationName,
ActiveMQDestination destination, BrokerConfiguration configuration) {
         super(UnsafeUriCharactersEncoder.encode(uri), component);
+        this.destinationName = destinationName;
         this.destination = destination;
         this.configuration = configuration;
     }
@@ -82,10 +86,17 @@ public class BrokerEndpoint extends DefaultEndpoint implements MultipleConsumers
         return destination;
     }
 
+    /**
+     * The name of the JMS destination
+     */
+    public String getDestinationName() {
+        return destinationName;
+    }
+
     @Override
     protected void doStart() throws Exception {
         super.doStart();
-        messageInterceptorRegistry =  MessageInterceptorRegistry.getInstance().get(configuration.getBrokerName());
+        messageInterceptorRegistry = MessageInterceptorRegistry.getInstance().get(configuration.getBrokerName());
         for (MessageInterceptor messageInterceptor : messageInterceptorList) {
             addMessageInterceptor(messageInterceptor);
         }

http://git-wip-us.apache.org/repos/asf/activemq/blob/0aaee2c1/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 792117b..356774a 100755
--- a/pom.xml
+++ b/pom.xml
@@ -46,8 +46,8 @@
     <aopalliance-version>1.0</aopalliance-version>
     <aries-version>1.0.0</aries-version>
     <axion-version>1.0-M3-dev</axion-version>
-    <camel-version>2.14.1</camel-version>
-    <camel-version-range>[2.14,3)</camel-version-range>
+    <camel-version>2.15.0</camel-version>
+    <camel-version-range>[2.15,3)</camel-version-range>
     <cglib-version>2.2</cglib-version>
     <commons-beanutils-version>1.8.3</commons-beanutils-version>
     <commons-collections-version>3.2.1</commons-collections-version>


Mime
View raw message