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 2013/02/01 13:58:27 UTC
svn commit: r1441435 - in /activemq/trunk:
activemq-karaf-itest/src/test/resources/org/apache/activemq/karaf/itest/
activemq-osgi/src/main/java/org/apache/activemq/osgi/
Author: dejanb
Date: Fri Feb 1 12:58:26 2013
New Revision: 1441435
URL: http://svn.apache.org/viewvc?rev=1441435&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-4034 - osgi restart broker properly when pid properties changes
Added:
activemq/trunk/activemq-karaf-itest/src/test/resources/org/apache/activemq/karaf/itest/org.apache.activemq.server-default.cfg
- copied, changed from r1441375, activemq/trunk/activemq-karaf-itest/src/test/resources/org/apache/activemq/karaf/itest/org.apache.activemq.server.cfg
Removed:
activemq/trunk/activemq-karaf-itest/src/test/resources/org/apache/activemq/karaf/itest/org.apache.activemq.server.cfg
Modified:
activemq/trunk/activemq-osgi/src/main/java/org/apache/activemq/osgi/ActiveMQServiceFactory.java
Copied: activemq/trunk/activemq-karaf-itest/src/test/resources/org/apache/activemq/karaf/itest/org.apache.activemq.server-default.cfg (from r1441375, activemq/trunk/activemq-karaf-itest/src/test/resources/org/apache/activemq/karaf/itest/org.apache.activemq.server.cfg)
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-karaf-itest/src/test/resources/org/apache/activemq/karaf/itest/org.apache.activemq.server-default.cfg?p2=activemq/trunk/activemq-karaf-itest/src/test/resources/org/apache/activemq/karaf/itest/org.apache.activemq.server-default.cfg&p1=activemq/trunk/activemq-karaf-itest/src/test/resources/org/apache/activemq/karaf/itest/org.apache.activemq.server.cfg&r1=1441375&r2=1441435&rev=1441435&view=diff
==============================================================================
(empty)
Modified: activemq/trunk/activemq-osgi/src/main/java/org/apache/activemq/osgi/ActiveMQServiceFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-osgi/src/main/java/org/apache/activemq/osgi/ActiveMQServiceFactory.java?rev=1441435&r1=1441434&r2=1441435&view=diff
==============================================================================
--- activemq/trunk/activemq-osgi/src/main/java/org/apache/activemq/osgi/ActiveMQServiceFactory.java (original)
+++ activemq/trunk/activemq-osgi/src/main/java/org/apache/activemq/osgi/ActiveMQServiceFactory.java Fri Feb 1 12:58:26 2013
@@ -46,6 +46,10 @@ public class ActiveMQServiceFactory impl
@Override
synchronized public void updated(String pid, Dictionary properties) throws ConfigurationException {
+
+ // First stop currently running broker (if any)
+ deleted(pid);
+
String config = (String)properties.get("config");
if (config == null) {
throw new ConfigurationException("config", "Property must be set");
@@ -106,13 +110,12 @@ public class ActiveMQServiceFactory impl
@Override
synchronized public void deleted(String pid) {
- LOG.info("Stopping broker " + pid);
BrokerService broker = brokers.get(pid);
if (broker == null) {
- LOG.warn("Broker " + pid + " not found");
return;
}
try {
+ LOG.info("Stopping broker " + pid);
broker.stop();
broker.waitUntilStopped();
} catch (Exception e) {