From 8f02d0e6b33ec968d79cf06925536114c3032095 Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Wed, 16 Jul 2008 20:25:12 +0000 Subject: 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 --- qpid/cpp/examples/qmf-agent/example.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'qpid/cpp/examples/qmf-agent/example.cpp') 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); -- cgit v1.2.1