diff options
| author | Alan Conway <aconway@apache.org> | 2008-10-07 17:27:06 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2008-10-07 17:27:06 +0000 |
| commit | 41d33af55b9fbf4c664ccb56accb1a37bd1ef006 (patch) | |
| tree | de5e5b5e431bf695b2c44e198ee93d179201a0e2 /cpp/src/qpid/cluster/ClusterPlugin.cpp | |
| parent | a653ebe5bdfad1d44a576d2ab23f7e6ea80ba96f (diff) | |
| download | qpid-python-41d33af55b9fbf4c664ccb56accb1a37bd1ef006.tar.gz | |
broker: Fixed incorrect pass-by-reference of Queue::shared_ptr in several files.
cluster: added FailoverExchange - send cluster membership to clients.
client: added FailoverListener - receive cluster updates from failover exchange.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@702552 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/ClusterPlugin.cpp')
| -rw-r--r-- | cpp/src/qpid/cluster/ClusterPlugin.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cpp/src/qpid/cluster/ClusterPlugin.cpp b/cpp/src/qpid/cluster/ClusterPlugin.cpp index 8457467196..14a666a1c6 100644 --- a/cpp/src/qpid/cluster/ClusterPlugin.cpp +++ b/cpp/src/qpid/cluster/ClusterPlugin.cpp @@ -34,6 +34,7 @@ namespace qpid { namespace cluster { using namespace std; +using broker::Broker; struct ClusterValues { string name; @@ -74,12 +75,14 @@ struct ClusterPlugin : public Plugin { Options* getOptions() { return &options; } void initialize(Plugin::Target& target) { - broker::Broker* broker = dynamic_cast<broker::Broker*>(&target); - if (!broker || values.name.empty()) return; // Only if --cluster-name option was specified. + if (values.name.empty()) return; // Only if --cluster-name option was specified. + Broker* broker = dynamic_cast<Broker*>(&target); + if (!broker) return; cluster = new Cluster(values.name, values.getUrl(broker->getPort()), *broker); broker->setConnectionFactory( boost::shared_ptr<sys::ConnectionCodec::Factory>( new ConnectionCodec::Factory(broker->getConnectionFactory(), *cluster))); + broker->getExchanges().registerExchange(cluster->getFailoverExchange()); } void earlyInitialize(Plugin::Target&) {} |
