karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject [41/50] git commit: [KARAF-2478] Producer and consumer status is updated when configuration is changed on the cluster
Date Wed, 18 Dec 2013 12:27:56 GMT
[KARAF-2478] Producer and consumer status is updated when configuration is changed on the cluster

git-svn-id: https://svn.apache.org/repos/asf/karaf/cellar/branches/cellar-2.3.x@1528840 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/karaf-cellar/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf-cellar/commit/dcd671e1
Tree: http://git-wip-us.apache.org/repos/asf/karaf-cellar/tree/dcd671e1
Diff: http://git-wip-us.apache.org/repos/asf/karaf-cellar/diff/dcd671e1

Branch: refs/heads/cellar-2.3.x
Commit: dcd671e1372529eee98e88c3b6a3fd1828a6df4b
Parents: 388b42f
Author: jbonofre <jbonofre@13f79535-47bb-0310-9956-ffa450edef68>
Authored: Thu Oct 3 13:03:58 2013 +0000
Committer: jbonofre <jbonofre@13f79535-47bb-0310-9956-ffa450edef68>
Committed: Thu Oct 3 13:03:58 2013 +0000

----------------------------------------------------------------------
 .../hazelcast/HazelcastEventTransportFactory.java     | 14 ++++++++++++++
 .../main/resources/OSGI-INF/blueprint/blueprint.xml   |  1 +
 2 files changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/dcd671e1/hazelcast/src/main/java/org/apache/karaf/cellar/hazelcast/HazelcastEventTransportFactory.java
----------------------------------------------------------------------
diff --git a/hazelcast/src/main/java/org/apache/karaf/cellar/hazelcast/HazelcastEventTransportFactory.java
b/hazelcast/src/main/java/org/apache/karaf/cellar/hazelcast/HazelcastEventTransportFactory.java
index d947e69..6f2c1ef 100644
--- a/hazelcast/src/main/java/org/apache/karaf/cellar/hazelcast/HazelcastEventTransportFactory.java
+++ b/hazelcast/src/main/java/org/apache/karaf/cellar/hazelcast/HazelcastEventTransportFactory.java
@@ -20,6 +20,7 @@ import org.apache.karaf.cellar.core.event.EventConsumer;
 import org.apache.karaf.cellar.core.event.EventProducer;
 import org.apache.karaf.cellar.core.event.EventTransportFactory;
 import org.apache.karaf.cellar.core.utils.CombinedClassLoader;
+import org.osgi.service.cm.ConfigurationAdmin;
 
 /**
  * A cluster event transport factory powered by Hazelcast.
@@ -28,6 +29,7 @@ public class HazelcastEventTransportFactory extends HazelcastInstanceAware
imple
 
     private Dispatcher dispatcher;
     private CombinedClassLoader combinedClassLoader;
+    private ConfigurationAdmin configurationAdmin;
 
     @Override
     public EventProducer getEventProducer(String name, Boolean pubsub) {
@@ -37,6 +39,7 @@ public class HazelcastEventTransportFactory extends HazelcastInstanceAware
imple
             producer.setInstance(instance);
             producer.setTopic(topic);
             producer.setNode(getNode());
+            producer.setConfigurationAdmin(configurationAdmin);
             producer.init();
             return producer;
         } else {
@@ -44,6 +47,7 @@ public class HazelcastEventTransportFactory extends HazelcastInstanceAware
imple
             QueueProducer producer = new QueueProducer();
             producer.setQueue(queue);
             producer.setNode(getNode());
+            producer.setConfigurationAdmin(configurationAdmin);
             producer.init();
             return producer;
         }
@@ -58,6 +62,7 @@ public class HazelcastEventTransportFactory extends HazelcastInstanceAware
imple
             consumer.setInstance(instance);
             consumer.setNode(getNode());
             consumer.setDispatcher(dispatcher);
+            consumer.setConfigurationAdmin(configurationAdmin);
             consumer.init();
             return consumer;
         } else {
@@ -66,6 +71,7 @@ public class HazelcastEventTransportFactory extends HazelcastInstanceAware
imple
             consumer.setQueue(queue);
             consumer.setNode(getNode());
             consumer.setDispatcher(dispatcher);
+            consumer.setConfigurationAdmin(configurationAdmin);
             consumer.init();
             return consumer;
         }
@@ -87,4 +93,12 @@ public class HazelcastEventTransportFactory extends HazelcastInstanceAware
imple
         this.combinedClassLoader = combinedClassLoader;
     }
 
+    public ConfigurationAdmin getConfigurationAdmin() {
+        return configurationAdmin;
+    }
+
+    public void setConfigurationAdmin(ConfigurationAdmin configurationAdmin) {
+        this.configurationAdmin = configurationAdmin;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/karaf-cellar/blob/dcd671e1/hazelcast/src/main/resources/OSGI-INF/blueprint/blueprint.xml
----------------------------------------------------------------------
diff --git a/hazelcast/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/hazelcast/src/main/resources/OSGI-INF/blueprint/blueprint.xml
index 0b43545..2f626d7 100644
--- a/hazelcast/src/main/resources/OSGI-INF/blueprint/blueprint.xml
+++ b/hazelcast/src/main/resources/OSGI-INF/blueprint/blueprint.xml
@@ -73,6 +73,7 @@
         <property name="dispatcher" ref="dispatcher"/>
         <property name="instance" ref="hazelcast"/>
         <property name="combinedClassLoader" ref="combinedClassLoader"/>
+        <property name="configurationAdmin" ref="configurationAdmin"/>
     </bean>
     <service ref="eventTransportFactory" interface="org.apache.karaf.cellar.core.event.EventTransportFactory"/>
 


Mime
View raw message