diff options
author | Robert Gemmell <robbie@apache.org> | 2011-07-07 15:11:41 +0000 |
---|---|---|
committer | Robert Gemmell <robbie@apache.org> | 2011-07-07 15:11:41 +0000 |
commit | fb841fd038349acf56b2246fed59e8efc41250fc (patch) | |
tree | d15101f6e4c39729ae2b17990ae4139f5a0fcf85 /java/broker-plugins | |
parent | 05a123dd261ecd666aa69d73f471a33ab08e8d19 (diff) | |
download | qpid-python-fb841fd038349acf56b2246fed59e8efc41250fc.tar.gz |
QPID-3026: remove incomplete support for multiple ApplicationRegistry instances to be active at one time
Applied patch by Keith Wall and myself
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1143869 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/broker-plugins')
2 files changed, 19 insertions, 12 deletions
diff --git a/java/broker-plugins/experimental/info/src/main/java/org/apache/qpid/info/Activator.java b/java/broker-plugins/experimental/info/src/main/java/org/apache/qpid/info/Activator.java index c7d3fd38ff..21e7be26c1 100644 --- a/java/broker-plugins/experimental/info/src/main/java/org/apache/qpid/info/Activator.java +++ b/java/broker-plugins/experimental/info/src/main/java/org/apache/qpid/info/Activator.java @@ -59,7 +59,14 @@ public class Activator implements BundleActivator _ctx = ctx; _service = new InfoServiceImpl(); ctx.registerService(InfoService.class.getName(), _service, null); - sendInfo("STARTUP"); + + new Thread(new Runnable() + { + public void run() + { + sendInfo("STARTUP"); + } + }).start(); } } diff --git a/java/broker-plugins/firewall/src/test/java/org/apache/qpid/server/security/access/FirewallConfigurationTest.java b/java/broker-plugins/firewall/src/test/java/org/apache/qpid/server/security/access/FirewallConfigurationTest.java index c0cb4aedce..d230a49bde 100644 --- a/java/broker-plugins/firewall/src/test/java/org/apache/qpid/server/security/access/FirewallConfigurationTest.java +++ b/java/broker-plugins/firewall/src/test/java/org/apache/qpid/server/security/access/FirewallConfigurationTest.java @@ -28,11 +28,11 @@ import java.net.InetSocketAddress; import org.apache.qpid.server.registry.ApplicationRegistry; import org.apache.qpid.server.registry.ConfigurationFileApplicationRegistry; -import org.apache.qpid.server.util.InternalBrokerBaseCase; import org.apache.qpid.server.virtualhost.VirtualHost; import org.apache.qpid.server.virtualhost.VirtualHostRegistry; +import org.apache.qpid.test.utils.QpidTestCase; -public class FirewallConfigurationTest extends InternalBrokerBaseCase +public class FirewallConfigurationTest extends QpidTestCase { public void testFirewallConfiguration() throws Exception { @@ -45,7 +45,7 @@ public class FirewallConfigurationTest extends InternalBrokerBaseCase ApplicationRegistry reg = new ConfigurationFileApplicationRegistry(mainFile); try { - ApplicationRegistry.initialise(reg, 1); + ApplicationRegistry.initialise(reg); // Test config assertFalse(reg.getSecurityManager().accessVirtualhost("test", new InetSocketAddress("127.0.0.1", 65535))); @@ -53,7 +53,7 @@ public class FirewallConfigurationTest extends InternalBrokerBaseCase } finally { - ApplicationRegistry.remove(1); + ApplicationRegistry.remove(); } } @@ -114,14 +114,14 @@ public class FirewallConfigurationTest extends InternalBrokerBaseCase ApplicationRegistry reg = new ConfigurationFileApplicationRegistry(mainFile); try { - ApplicationRegistry.initialise(reg, 1); + ApplicationRegistry.initialise(reg); // Test config assertFalse(reg.getSecurityManager().accessVirtualhost("test", new InetSocketAddress("127.0.0.1", 65535))); } finally { - ApplicationRegistry.remove(1); + ApplicationRegistry.remove(); } } @@ -137,7 +137,7 @@ public class FirewallConfigurationTest extends InternalBrokerBaseCase ApplicationRegistry reg = new ConfigurationFileApplicationRegistry(mainFile); try { - ApplicationRegistry.initialise(reg, 1); + ApplicationRegistry.initialise(reg); // Test config assertFalse(reg.getSecurityManager().accessVirtualhost("test", new InetSocketAddress("127.0.0.1", 65535))); @@ -151,7 +151,7 @@ public class FirewallConfigurationTest extends InternalBrokerBaseCase } finally { - ApplicationRegistry.remove(1); + ApplicationRegistry.remove(); } } @@ -211,7 +211,7 @@ public class FirewallConfigurationTest extends InternalBrokerBaseCase ApplicationRegistry reg = new ConfigurationFileApplicationRegistry(mainFile); try { - ApplicationRegistry.initialise(reg, 1); + ApplicationRegistry.initialise(reg); // Test config assertFalse(reg.getSecurityManager().accessVirtualhost("test", new InetSocketAddress("127.0.0.1", 65535))); @@ -248,7 +248,7 @@ public class FirewallConfigurationTest extends InternalBrokerBaseCase } finally { - ApplicationRegistry.remove(1); + ApplicationRegistry.remove(); } } @@ -334,7 +334,7 @@ public class FirewallConfigurationTest extends InternalBrokerBaseCase // Load config ApplicationRegistry reg = new ConfigurationFileApplicationRegistry(mainFile); - ApplicationRegistry.initialise(reg, 1); + ApplicationRegistry.initialise(reg); // Test config VirtualHostRegistry virtualHostRegistry = reg.getVirtualHostRegistry(); |