You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by de...@apache.org on 2015/02/11 12:42:55 UTC

activemq git commit: https://issues.apache.org/jira/browse/AMQ-5558 - enable producer/consumer commands in karaf

Repository: activemq
Updated Branches:
  refs/heads/master 35683c1c1 -> 01d015514


https://issues.apache.org/jira/browse/AMQ-5558 - enable producer/consumer commands in karaf


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

Branch: refs/heads/master
Commit: 01d0155149388f7107b00086c8fe90878b45d93f
Parents: 35683c1
Author: Dejan Bosanac <de...@nighttale.net>
Authored: Wed Feb 11 12:42:46 2015 +0100
Committer: Dejan Bosanac <de...@nighttale.net>
Committed: Wed Feb 11 12:42:46 2015 +0100

----------------------------------------------------------------------
 .../activemq/console/command/consumer.txt       |  4 +-
 .../activemq/console/command/producer.txt       |  4 +-
 .../OSGI-INF/blueprint/activemq-karaf.xml       | 43 ++++++++++++++++++++
 3 files changed, 47 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/01d01551/activemq-console/src/main/resources/org/apache/activemq/console/command/consumer.txt
----------------------------------------------------------------------
diff --git a/activemq-console/src/main/resources/org/apache/activemq/console/command/consumer.txt b/activemq-console/src/main/resources/org/apache/activemq/console/command/consumer.txt
index a834ca1..bc6f4df 100644
--- a/activemq-console/src/main/resources/org/apache/activemq/console/command/consumer.txt
+++ b/activemq-console/src/main/resources/org/apache/activemq/console/command/consumer.txt
@@ -1,10 +1,10 @@
 Usage: consumer [OPTIONS]
 Description: Demo consumer that can be used to receive messages to the broker
 Options :
-    [--brokerUrl                                   URL] - connection factory url; default " + ActiveMQConnectionFactory.DEFAULT_BROKER_URL
+    [--brokerUrl                                   URL] - connection factory url; default ActiveMQConnectionFactory.DEFAULT_BROKER_URL
     [--user                                         ..] - connection user name
     [--password                                     ..] - connection password
-    [--destination               queue://..|topic://..] - ; default TEST
+    [--destination               queue://..|topic://..] - consumer destination; default queue://TEST
     [--messageCount                                  N] - number of messages to send; default 1000
     [--sleep                                         N] - millisecond sleep period between sends or receives; default 0
     [--transactionBatchSize                          N] - use send transaction batches of size N; default 0, no jms transactions

http://git-wip-us.apache.org/repos/asf/activemq/blob/01d01551/activemq-console/src/main/resources/org/apache/activemq/console/command/producer.txt
----------------------------------------------------------------------
diff --git a/activemq-console/src/main/resources/org/apache/activemq/console/command/producer.txt b/activemq-console/src/main/resources/org/apache/activemq/console/command/producer.txt
index 3cf5550..0e183fb 100644
--- a/activemq-console/src/main/resources/org/apache/activemq/console/command/producer.txt
+++ b/activemq-console/src/main/resources/org/apache/activemq/console/command/producer.txt
@@ -1,10 +1,10 @@
 Usage: producer [OPTIONS]
 Description: Demo producer that can be used to send messages to the broker
 Options :
-    [--brokerUrl                                   URL] - connection factory url; default " + ActiveMQConnectionFactory.DEFAULT_BROKER_URL
+    [--brokerUrl                                   URL] - connection factory url; default ActiveMQConnectionFactory.DEFAULT_BROKER_URL
     [--user                                         ..] - connection user name
     [--password                                     ..] - connection password
-    [--destination               queue://..|topic://..] - ; default TEST
+    [--destination               queue://..|topic://..] - producer destination; default queue://TEST
     [--persistent                           true|false] - use persistent or non persistent messages; default true
     [--messageCount                                  N] - number of messages to send; default 1000
     [--sleep                                         N] - millisecond sleep period between sends or receives; default 0

http://git-wip-us.apache.org/repos/asf/activemq/blob/01d01551/activemq-karaf/src/main/resources/OSGI-INF/blueprint/activemq-karaf.xml
----------------------------------------------------------------------
diff --git a/activemq-karaf/src/main/resources/OSGI-INF/blueprint/activemq-karaf.xml b/activemq-karaf/src/main/resources/OSGI-INF/blueprint/activemq-karaf.xml
index f5dda89..5bafc10 100644
--- a/activemq-karaf/src/main/resources/OSGI-INF/blueprint/activemq-karaf.xml
+++ b/activemq-karaf/src/main/resources/OSGI-INF/blueprint/activemq-karaf.xml
@@ -152,4 +152,47 @@
     </property>
   </bean>
 
+    <!-- ActiveMQ Producer Command -->
+    <bean id="producercommand" class="org.apache.activemq.karaf.commands.ActiveMQCommand">
+      <property name="blueprintContainer" ref="blueprintContainer"/>
+      <property name="blueprintConverter" ref="blueprintConverter"/>
+      <property name="actionId" value="produceraction"/>
+    </bean>
+
+    <service ref="producercommand" auto-export="interfaces" activation="lazy">
+      <service-properties>
+        <entry key="osgi.command.scope" value="activemq"/>
+        <entry key="osgi.command.function" value="producer"/>
+      </service-properties>
+    </service>
+
+    <bean id="produceraction" class="org.apache.activemq.karaf.commands.ActiveMQCommandSupport"
+          activation="lazy"
+          scope="prototype">
+      <property name="command">
+        <bean class="org.apache.activemq.console.command.ProducerCommand"/>
+      </property>
+    </bean>
+
+    <!-- ActiveMQ Consumer Command -->
+    <bean id="consumercommand" class="org.apache.activemq.karaf.commands.ActiveMQCommand">
+      <property name="blueprintContainer" ref="blueprintContainer"/>
+      <property name="blueprintConverter" ref="blueprintConverter"/>
+      <property name="actionId" value="consumeraction"/>
+    </bean>
+
+    <service ref="consumercommand" auto-export="interfaces" activation="lazy">
+      <service-properties>
+        <entry key="osgi.command.scope" value="activemq"/>
+        <entry key="osgi.command.function" value="consumer"/>
+      </service-properties>
+    </service>
+
+    <bean id="consumeraction" class="org.apache.activemq.karaf.commands.ActiveMQCommandSupport"
+          activation="lazy"
+          scope="prototype">
+      <property name="command">
+        <bean class="org.apache.activemq.console.command.ConsumerCommand"/>
+      </property>
+    </bean>
 </blueprint>