From 314eb1b65a752daaa80a2cb5174bac78c4643bcb Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 4 Feb 2009 17:04:45 +0000 Subject: Cluster sets recovery flag on Broker for first member in cluster. Disable recovery from local store if the recovery flag is not set. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@740793 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/cluster/ClusterPlugin.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'cpp/src/qpid/cluster/ClusterPlugin.cpp') diff --git a/cpp/src/qpid/cluster/ClusterPlugin.cpp b/cpp/src/qpid/cluster/ClusterPlugin.cpp index 1c15747c77..7e0bdcbea8 100644 --- a/cpp/src/qpid/cluster/ClusterPlugin.cpp +++ b/cpp/src/qpid/cluster/ClusterPlugin.cpp @@ -136,13 +136,13 @@ struct ClusterPlugin : public Plugin { Options* getOptions() { return &options; } - void initialize(Plugin::Target& target) { + void earlyInitialize(Plugin::Target& target) { if (values.name.empty()) return; // Only if --cluster-name option was specified. Broker* broker = dynamic_cast(&target); if (!broker) return; cluster = new Cluster( values.name, - values.getUrl(broker->getPort(Broker::TCP_TRANSPORT)), + values.url.empty() ? Url() : Url(values.url), *broker, values.quorum, values.readMax, values.writeEstimate*1024 @@ -158,7 +158,9 @@ struct ClusterPlugin : public Plugin { } } - void earlyInitialize(Plugin::Target&) {} + void initialize(Plugin::Target& ) { + cluster->initialize(); + } }; static ClusterPlugin instance; // Static initialization. -- cgit v1.2.1