diff options
author | Ted Ross <tross@apache.org> | 2008-07-16 20:25:12 +0000 |
---|---|---|
committer | Ted Ross <tross@apache.org> | 2008-07-16 20:25:12 +0000 |
commit | 8f02d0e6b33ec968d79cf06925536114c3032095 (patch) | |
tree | d5036366b3a3ecfc757eee05d2fc83e3f33636b9 /qpid/cpp/examples/qmf-agent/example.cpp | |
parent | 1fa9984f40a0b6d2b8bc94dab775a234c2fc029c (diff) | |
download | qpid-python-8f02d0e6b33ec968d79cf06925536114c3032095.tar.gz |
QPID-1170 - Provide a better factory for creation and deletion of the management agent
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@677408 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/examples/qmf-agent/example.cpp')
-rw-r--r-- | qpid/cpp/examples/qmf-agent/example.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qpid/cpp/examples/qmf-agent/example.cpp b/qpid/cpp/examples/qmf-agent/example.cpp index 4113d22cac..7b28595f14 100644 --- a/qpid/cpp/examples/qmf-agent/example.cpp +++ b/qpid/cpp/examples/qmf-agent/example.cpp @@ -68,11 +68,12 @@ CoreClass::CoreClass(ManagementAgent* agent, string _name) : name(_name) // Main program //============================================================== int main(int argc, char** argv) { + ManagementAgent::Singleton singleton; const char* host = argc>1 ? argv[1] : "127.0.0.1"; int port = argc>2 ? atoi(argv[2]) : 5672; // Create the qmf management agent - ManagementAgent* agent = new ManagementAgentImpl(); + ManagementAgent* agent = singleton.getInstance(); // Register the Qmf_example schema with the agent PackageQmf_example packageInit(agent); |