summaryrefslogtreecommitdiff
path: root/qpid/java/broker/src/main/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/java/broker/src/main/java/org')
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java6
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java35
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java12
3 files changed, 31 insertions, 22 deletions
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java
index 2afd3c1dc3..5cfa8066e5 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQBrokerManagerMBean.java
@@ -317,8 +317,10 @@ public class AMQBrokerManagerMBean extends AMQManagedObject implements ManagedBr
try
{
queue.delete();
- _messageStore.removeQueue(queue);
-
+ if (queue.isDurable())
+ {
+ _messageStore.removeQueue(queue);
+ }
}
catch (AMQException ex)
{
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java
index b3c8975c7c..a72c2889d1 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java
@@ -148,32 +148,27 @@ public class ServerConfiguration implements SignalHandler
Object thing = i.next();
if (thing instanceof String)
{
+ //Open the Virtualhost.xml file and copy values in to main config
XMLConfiguration vhostConfiguration = new XMLConfiguration((String) thing);
- List hosts = vhostConfiguration.getList("virtualhost.name");
- for (int j = 0; j < hosts.size(); j++)
- {
- String name = (String) hosts.get(j);
- // Add the keys of the virtual host to the main config then bail out
-
- Configuration myConf = vhostConfiguration.subset("virtualhost." + name);
- Iterator k = myConf.getKeys();
- while (k.hasNext())
- {
- String key = (String) k.next();
- conf.setProperty("virtualhosts.virtualhost."+name+"."+key, myConf.getProperty(key));
- }
- VirtualHostConfiguration vhostConfig = new VirtualHostConfiguration(name, conf.subset("virtualhosts.virtualhost."+name));
- _virtualHosts.put(vhostConfig.getName(), vhostConfig);
- }
- // Grab things other than the virtualhosts themselves
Iterator keys = vhostConfiguration.getKeys();
while (keys.hasNext())
{
String key = (String) keys.next();
- conf.setProperty("virtualhosts."+key, vhostConfiguration.getProperty(key));
+ conf.setProperty("virtualhosts." + key, vhostConfiguration.getProperty(key));
}
}
}
+
+ List hosts = conf.getList("virtualhosts.virtualhost.name");
+ for (int j = 0; j < hosts.size(); j++)
+ {
+ String name = (String) hosts.get(j);
+ // Add the keys of the virtual host to the main config then bail out
+
+ VirtualHostConfiguration vhostConfig = new VirtualHostConfiguration(name, conf.subset("virtualhosts.virtualhost." + name));
+ _virtualHosts.put(vhostConfig.getName(), vhostConfig);
+ }
+
}
private void substituteEnvironmentVariables()
@@ -203,7 +198,7 @@ public class ServerConfiguration implements SignalHandler
}
/**
- * Check the configuration file to see if status updates are enabled.
+ * Check the configuration file to see if status updates are enabled.
* @return true if status updates are enabled
*/
public boolean getStatusUpdatesEnabled()
@@ -467,7 +462,7 @@ public class ServerConfiguration implements SignalHandler
{
return getConfig().getBoolean("management.enabled", true);
}
-
+
public void setManagementEnabled(boolean enabled)
{
getConfig().setProperty("management.enabled", enabled);
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
index aec437b700..3b776a62b4 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHost.java
@@ -195,10 +195,22 @@ public class VirtualHost implements Accessable
// perform a createExchange twice with the same details in the
// MessageStore(RoutingTable) as some instances may not like that.
// Derby being one.
+ // todo this can be removed with the resolution fo QPID-2096
configFileRT.exchange.clear();
initialiseModel(hostConfig);
+ //todo REMOVE Work Around for QPID-2096
+ // This means that all durable exchanges declared in the configuration
+ // will not be stored in the MessageStore.
+ // They will still be created/registered/available on startup for as
+ // long as they are contained in the configuration. However, when they
+ // are removed from the configuration they will no longer exist.
+ // This differs from durable queues as they will be writen to to the
+ // store. After QPID-2096 has been resolved exchanges will mirror that
+ // functionality.
+ configFileRT.exchange.clear();
+
if (store != null)
{
_messageStore = store;