diff options
| author | Martin Ritchie <ritchiem@apache.org> | 2010-06-03 21:29:48 +0000 |
|---|---|---|
| committer | Martin Ritchie <ritchiem@apache.org> | 2010-06-03 21:29:48 +0000 |
| commit | 71a2d14844f5531fd8da17b10c342dd59af71153 (patch) | |
| tree | b2adee008877376849cdd6fff6af0fd90bd3b2d5 /java/broker/src | |
| parent | 69333f9a750d92659799d4f08dd5c52e0393e2c0 (diff) | |
| download | qpid-python-71a2d14844f5531fd8da17b10c342dd59af71153.tar.gz | |
QPID-1447 : Ensure we only attempt to load plugins that are configured and so will be created.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@951168 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/broker/src')
| -rw-r--r-- | java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostImpl.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostImpl.java b/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostImpl.java index f7ad934a57..5ea4ade559 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostImpl.java +++ b/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostImpl.java @@ -303,10 +303,14 @@ public class VirtualHostImpl implements VirtualHost { VirtualHostPlugin plugin = plugins.get(pluginName).newInstance(this); - _houseKeepingTasks.scheduleAtFixedRate(plugin, plugin.getDelay() / 2, - plugin.getDelay(), plugin.getTimeUnit()); + // If we had configuration for the plugin the schedule it. + if (plugin != null) + { + _houseKeepingTasks.scheduleAtFixedRate(plugin, plugin.getDelay() / 2, + plugin.getDelay(), plugin.getTimeUnit()); - _logger.info("Loaded VirtualHostPlugin:" + plugin); + _logger.info("Loaded VirtualHostPlugin:" + plugin); + } } catch (RuntimeException e) { |
