THRIFT-1459 declare shared_ptr as boost::shared_ptr

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1213090 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/cpp/src/StressTest.cpp b/test/cpp/src/StressTest.cpp
index 339e7d1..a668fdf 100755
--- a/test/cpp/src/StressTest.cpp
+++ b/test/cpp/src/StressTest.cpp
@@ -109,7 +109,7 @@
 class ClientThread: public Runnable {
 public:
 
-  ClientThread(shared_ptr<TTransport>transport, shared_ptr<ServiceClient> client, Monitor& monitor, size_t& workerCount, size_t loopCount, TType loopType) :
+  ClientThread(boost::shared_ptr<TTransport>transport, boost::shared_ptr<ServiceClient> client, Monitor& monitor, size_t& workerCount, size_t loopCount, TType loopType) :
     _transport(transport),
     _client(client),
     _monitor(monitor),
@@ -200,8 +200,8 @@
     }
   }
 
-  shared_ptr<TTransport> _transport;
-  shared_ptr<ServiceClient> _client;
+  boost::shared_ptr<TTransport> _transport;
+  boost::shared_ptr<ServiceClient> _client;
   Monitor& _monitor;
   size_t& _workerCount;
   size_t _loopCount;
@@ -326,23 +326,23 @@
     cerr << usage;
   }
 
-  shared_ptr<PlatformThreadFactory> threadFactory = shared_ptr<PlatformThreadFactory>(new PlatformThreadFactory());
+  boost::shared_ptr<PlatformThreadFactory> threadFactory = boost::shared_ptr<PlatformThreadFactory>(new PlatformThreadFactory());
 
   // Dispatcher
-  shared_ptr<Server> serviceHandler(new Server());
+  boost::shared_ptr<Server> serviceHandler(new Server());
 
   if (replayRequests) {
-    shared_ptr<Server> serviceHandler(new Server());
-    shared_ptr<ServiceProcessor> serviceProcessor(new ServiceProcessor(serviceHandler));
+    boost::shared_ptr<Server> serviceHandler(new Server());
+    boost::shared_ptr<ServiceProcessor> serviceProcessor(new ServiceProcessor(serviceHandler));
 
     // Transports
-    shared_ptr<TFileTransport> fileTransport(new TFileTransport(requestLogPath));
+    boost::shared_ptr<TFileTransport> fileTransport(new TFileTransport(requestLogPath));
     fileTransport->setChunkSize(2 * 1024 * 1024);
     fileTransport->setMaxEventSize(1024 * 16);
     fileTransport->seekToEnd();
 
     // Protocol Factory
-    shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
+    boost::shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
 
     TFileProcessor fileProcessor(serviceProcessor,
                                  protocolFactory,
@@ -355,44 +355,44 @@
 
   if (runServer) {
 
-    shared_ptr<ServiceProcessor> serviceProcessor(new ServiceProcessor(serviceHandler));
+    boost::shared_ptr<ServiceProcessor> serviceProcessor(new ServiceProcessor(serviceHandler));
 
     // Transport
-    shared_ptr<TServerSocket> serverSocket(new TServerSocket(port));
+    boost::shared_ptr<TServerSocket> serverSocket(new TServerSocket(port));
 
     // Transport Factory
-    shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory());
+    boost::shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory());
 
     // Protocol Factory
-    shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
+    boost::shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
 
     if (logRequests) {
       // initialize the log file
-      shared_ptr<TFileTransport> fileTransport(new TFileTransport(requestLogPath));
+      boost::shared_ptr<TFileTransport> fileTransport(new TFileTransport(requestLogPath));
       fileTransport->setChunkSize(2 * 1024 * 1024);
       fileTransport->setMaxEventSize(1024 * 16);
 
       transportFactory =
-        shared_ptr<TTransportFactory>(new TPipedTransportFactory(fileTransport));
+        boost::shared_ptr<TTransportFactory>(new TPipedTransportFactory(fileTransport));
     }
 
-    shared_ptr<Thread> serverThread;
+    boost::shared_ptr<Thread> serverThread;
 
     if (serverType == "simple") {
 
-      serverThread = threadFactory->newThread(shared_ptr<TServer>(new TSimpleServer(serviceProcessor, serverSocket, transportFactory, protocolFactory)));
+      serverThread = threadFactory->newThread(boost::shared_ptr<TServer>(new TSimpleServer(serviceProcessor, serverSocket, transportFactory, protocolFactory)));
 
     } else if (serverType == "threaded") {
 
-      serverThread = threadFactory->newThread(shared_ptr<TServer>(new TThreadedServer(serviceProcessor, serverSocket, transportFactory, protocolFactory)));
+      serverThread = threadFactory->newThread(boost::shared_ptr<TServer>(new TThreadedServer(serviceProcessor, serverSocket, transportFactory, protocolFactory)));
 
     } else if (serverType == "thread-pool") {
 
-      shared_ptr<ThreadManager> threadManager = ThreadManager::newSimpleThreadManager(workerCount);
+      boost::shared_ptr<ThreadManager> threadManager = ThreadManager::newSimpleThreadManager(workerCount);
 
       threadManager->threadFactory(threadFactory);
       threadManager->start();
-      serverThread = threadFactory->newThread(shared_ptr<TServer>(new TThreadPoolServer(serviceProcessor, serverSocket, transportFactory, protocolFactory, threadManager)));
+      serverThread = threadFactory->newThread(boost::shared_ptr<TServer>(new TThreadPoolServer(serviceProcessor, serverSocket, transportFactory, protocolFactory, threadManager)));
     }
 
     cerr << "Starting the server on port " << port << endl;
@@ -412,7 +412,7 @@
 
     size_t threadCount = 0;
 
-    set<shared_ptr<Thread> > clientThreads;
+    set<boost::shared_ptr<Thread> > clientThreads;
 
     if (callName == "echoVoid") { loopType = T_VOID;}
     else if (callName == "echoByte") { loopType = T_BYTE;}
@@ -423,15 +423,15 @@
 
     for (size_t ix = 0; ix < clientCount; ix++) {
 
-      shared_ptr<TSocket> socket(new TSocket("127.0.0.1", port));
-      shared_ptr<TBufferedTransport> bufferedSocket(new TBufferedTransport(socket, 2048));
-      shared_ptr<TProtocol> protocol(new TBinaryProtocol(bufferedSocket));
-      shared_ptr<ServiceClient> serviceClient(new ServiceClient(protocol));
+      boost::shared_ptr<TSocket> socket(new TSocket("127.0.0.1", port));
+      boost::shared_ptr<TBufferedTransport> bufferedSocket(new TBufferedTransport(socket, 2048));
+      boost::shared_ptr<TProtocol> protocol(new TBinaryProtocol(bufferedSocket));
+      boost::shared_ptr<ServiceClient> serviceClient(new ServiceClient(protocol));
 
-      clientThreads.insert(threadFactory->newThread(shared_ptr<ClientThread>(new ClientThread(socket, serviceClient, monitor, threadCount, loopCount, loopType))));
+      clientThreads.insert(threadFactory->newThread(boost::shared_ptr<ClientThread>(new ClientThread(socket, serviceClient, monitor, threadCount, loopCount, loopType))));
     }
 
-    for (std::set<shared_ptr<Thread> >::const_iterator thread = clientThreads.begin(); thread != clientThreads.end(); thread++) {
+    for (std::set<boost::shared_ptr<Thread> >::const_iterator thread = clientThreads.begin(); thread != clientThreads.end(); thread++) {
       (*thread)->start();
     }
 
@@ -461,9 +461,9 @@
     int64_t minTime = 9223372036854775807LL;
     int64_t maxTime = 0;
 
-    for (set<shared_ptr<Thread> >::iterator ix = clientThreads.begin(); ix != clientThreads.end(); ix++) {
+    for (set<boost::shared_ptr<Thread> >::iterator ix = clientThreads.begin(); ix != clientThreads.end(); ix++) {
 
-      shared_ptr<ClientThread> client = dynamic_pointer_cast<ClientThread>((*ix)->runnable());
+      boost::shared_ptr<ClientThread> client = dynamic_pointer_cast<ClientThread>((*ix)->runnable());
 
       int64_t delta = client->_endTime - client->_startTime;
 
diff --git a/test/cpp/src/StressTestNonBlocking.cpp b/test/cpp/src/StressTestNonBlocking.cpp
index 2ff507b..4826a50 100755
--- a/test/cpp/src/StressTestNonBlocking.cpp
+++ b/test/cpp/src/StressTestNonBlocking.cpp
@@ -115,7 +115,7 @@
 class ClientThread: public Runnable {
 public:
 
-  ClientThread(shared_ptr<TTransport>transport, shared_ptr<ServiceClient> client, Monitor& monitor, size_t& workerCount, size_t loopCount, TType loopType) :
+  ClientThread(boost::shared_ptr<TTransport>transport, boost::shared_ptr<ServiceClient> client, Monitor& monitor, size_t& workerCount, size_t loopCount, TType loopType) :
     _transport(transport),
     _client(client),
     _monitor(monitor),
@@ -206,8 +206,8 @@
     }
   }
 
-  shared_ptr<TTransport> _transport;
-  shared_ptr<ServiceClient> _client;
+  boost::shared_ptr<TTransport> _transport;
+  boost::shared_ptr<ServiceClient> _client;
   Monitor& _monitor;
   size_t& _workerCount;
   size_t _loopCount;
@@ -321,23 +321,23 @@
     cerr << usage;
   }
 
-  shared_ptr<PlatformThreadFactory> threadFactory = shared_ptr<PlatformThreadFactory>(new PlatformThreadFactory());
+  boost::shared_ptr<PlatformThreadFactory> threadFactory = boost::shared_ptr<PlatformThreadFactory>(new PlatformThreadFactory());
 
   // Dispatcher
-  shared_ptr<Server> serviceHandler(new Server());
+  boost::shared_ptr<Server> serviceHandler(new Server());
 
   if (replayRequests) {
-    shared_ptr<Server> serviceHandler(new Server());
-    shared_ptr<ServiceProcessor> serviceProcessor(new ServiceProcessor(serviceHandler));
+    boost::shared_ptr<Server> serviceHandler(new Server());
+    boost::shared_ptr<ServiceProcessor> serviceProcessor(new ServiceProcessor(serviceHandler));
 
     // Transports
-    shared_ptr<TFileTransport> fileTransport(new TFileTransport(requestLogPath));
+    boost::shared_ptr<TFileTransport> fileTransport(new TFileTransport(requestLogPath));
     fileTransport->setChunkSize(2 * 1024 * 1024);
     fileTransport->setMaxEventSize(1024 * 16);
     fileTransport->seekToEnd();
 
     // Protocol Factory
-    shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
+    boost::shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
 
     TFileProcessor fileProcessor(serviceProcessor,
                                  protocolFactory,
@@ -350,40 +350,40 @@
 
   if (runServer) {
 
-    shared_ptr<ServiceProcessor> serviceProcessor(new ServiceProcessor(serviceHandler));
+    boost::shared_ptr<ServiceProcessor> serviceProcessor(new ServiceProcessor(serviceHandler));
 
     // Protocol Factory
-    shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
+    boost::shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
 
     // Transport Factory
-    shared_ptr<TTransportFactory>      transportFactory;
+    boost::shared_ptr<TTransportFactory>      transportFactory;
 
     if (logRequests) {
       // initialize the log file
-      shared_ptr<TFileTransport> fileTransport(new TFileTransport(requestLogPath));
+      boost::shared_ptr<TFileTransport> fileTransport(new TFileTransport(requestLogPath));
       fileTransport->setChunkSize(2 * 1024 * 1024);
       fileTransport->setMaxEventSize(1024 * 16);
 
       transportFactory =
-        shared_ptr<TTransportFactory>(new TPipedTransportFactory(fileTransport));
+        boost::shared_ptr<TTransportFactory>(new TPipedTransportFactory(fileTransport));
     }
 
-    shared_ptr<Thread> serverThread;
-    shared_ptr<Thread> serverThread2;
+    boost::shared_ptr<Thread> serverThread;
+    boost::shared_ptr<Thread> serverThread2;
 
     if (serverType == "simple") {
 
-      serverThread = threadFactory->newThread(shared_ptr<TServer>(new TNonblockingServer(serviceProcessor, protocolFactory, port)));
-      serverThread2 = threadFactory->newThread(shared_ptr<TServer>(new TNonblockingServer(serviceProcessor, protocolFactory, port+1)));
+      serverThread = threadFactory->newThread(boost::shared_ptr<TServer>(new TNonblockingServer(serviceProcessor, protocolFactory, port)));
+      serverThread2 = threadFactory->newThread(boost::shared_ptr<TServer>(new TNonblockingServer(serviceProcessor, protocolFactory, port+1)));
 
     } else if (serverType == "thread-pool") {
 
-      shared_ptr<ThreadManager> threadManager = ThreadManager::newSimpleThreadManager(workerCount);
+      boost::shared_ptr<ThreadManager> threadManager = ThreadManager::newSimpleThreadManager(workerCount);
 
       threadManager->threadFactory(threadFactory);
       threadManager->start();
-      serverThread = threadFactory->newThread(shared_ptr<TServer>(new TNonblockingServer(serviceProcessor, protocolFactory, port, threadManager)));
-      serverThread2 = threadFactory->newThread(shared_ptr<TServer>(new TNonblockingServer(serviceProcessor, protocolFactory, port+1, threadManager)));
+      serverThread = threadFactory->newThread(boost::shared_ptr<TServer>(new TNonblockingServer(serviceProcessor, protocolFactory, port, threadManager)));
+      serverThread2 = threadFactory->newThread(boost::shared_ptr<TServer>(new TNonblockingServer(serviceProcessor, protocolFactory, port+1, threadManager)));
     }
 
     cerr << "Starting the server on port " << port << " and " << (port + 1) << endl;
@@ -405,7 +405,7 @@
 
     size_t threadCount = 0;
 
-    set<shared_ptr<Thread> > clientThreads;
+    set<boost::shared_ptr<Thread> > clientThreads;
 
     if (callName == "echoVoid") { loopType = T_VOID;}
     else if (callName == "echoByte") { loopType = T_BYTE;}
@@ -416,15 +416,15 @@
 
     for (size_t ix = 0; ix < clientCount; ix++) {
 
-      shared_ptr<TSocket> socket(new TSocket("127.0.0.1", port + (ix % 2)));
-      shared_ptr<TFramedTransport> framedSocket(new TFramedTransport(socket));
-      shared_ptr<TProtocol> protocol(new TBinaryProtocol(framedSocket));
-      shared_ptr<ServiceClient> serviceClient(new ServiceClient(protocol));
+      boost::shared_ptr<TSocket> socket(new TSocket("127.0.0.1", port + (ix % 2)));
+      boost::shared_ptr<TFramedTransport> framedSocket(new TFramedTransport(socket));
+      boost::shared_ptr<TProtocol> protocol(new TBinaryProtocol(framedSocket));
+      boost::shared_ptr<ServiceClient> serviceClient(new ServiceClient(protocol));
 
-      clientThreads.insert(threadFactory->newThread(shared_ptr<ClientThread>(new ClientThread(socket, serviceClient, monitor, threadCount, loopCount, loopType))));
+      clientThreads.insert(threadFactory->newThread(boost::shared_ptr<ClientThread>(new ClientThread(socket, serviceClient, monitor, threadCount, loopCount, loopType))));
     }
 
-    for (std::set<shared_ptr<Thread> >::const_iterator thread = clientThreads.begin(); thread != clientThreads.end(); thread++) {
+    for (std::set<boost::shared_ptr<Thread> >::const_iterator thread = clientThreads.begin(); thread != clientThreads.end(); thread++) {
       (*thread)->start();
     }
 
@@ -454,9 +454,9 @@
     int64_t minTime = 9223372036854775807LL;
     int64_t maxTime = 0;
 
-    for (set<shared_ptr<Thread> >::iterator ix = clientThreads.begin(); ix != clientThreads.end(); ix++) {
+    for (set<boost::shared_ptr<Thread> >::iterator ix = clientThreads.begin(); ix != clientThreads.end(); ix++) {
 
-      shared_ptr<ClientThread> client = dynamic_pointer_cast<ClientThread>((*ix)->runnable());
+      boost::shared_ptr<ClientThread> client = dynamic_pointer_cast<ClientThread>((*ix)->runnable());
 
       int64_t delta = client->_endTime - client->_startTime;
 
diff --git a/test/cpp/src/TestClient.cpp b/test/cpp/src/TestClient.cpp
index ed560cb..e752f1c 100755
--- a/test/cpp/src/TestClient.cpp
+++ b/test/cpp/src/TestClient.cpp
@@ -82,7 +82,7 @@
 
     // next test
     delete client;
-    shared_ptr<TAsyncChannel> channel(new TEvhttpClientChannel(host, "/", host, port, base));
+    boost::shared_ptr<TAsyncChannel> channel(new TEvhttpClientChannel(host, "/", host, port, base));
     client = new ThriftTestCobClient(channel, protocolFactory);
     client->testString(tr1::bind(testString_clientReturn, host, port, base, protocolFactory, std::tr1::placeholders::_1), "Test");
   } catch (TException& exn) {
@@ -149,44 +149,44 @@
     ssl = true;
   }
 
-  shared_ptr<TTransport> transport;
-  shared_ptr<TProtocol> protocol;
+  boost::shared_ptr<TTransport> transport;
+  boost::shared_ptr<TProtocol> protocol;
 
-  shared_ptr<TSocket> socket;
-  shared_ptr<TSSLSocketFactory> factory;
+  boost::shared_ptr<TSocket> socket;
+  boost::shared_ptr<TSSLSocketFactory> factory;
 
   if (ssl) {
-    factory = shared_ptr<TSSLSocketFactory>(new TSSLSocketFactory());
+    factory = boost::shared_ptr<TSSLSocketFactory>(new TSSLSocketFactory());
     factory->ciphers("ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
     factory->loadTrustedCertificates("./trusted-ca-certificate.pem");
     factory->authenticate(true);
     socket = factory->createSocket(host, port);
   } else {
     if (domain_socket != "") {
-      socket = shared_ptr<TSocket>(new TSocket(domain_socket));
+      socket = boost::shared_ptr<TSocket>(new TSocket(domain_socket));
       port = 0;
     }
     else {
-      socket = shared_ptr<TSocket>(new TSocket(host, port));
+      socket = boost::shared_ptr<TSocket>(new TSocket(host, port));
     }
   }
 
   if (transport_type.compare("http") == 0) {
-    shared_ptr<TTransport> httpSocket(new THttpClient(socket, host, "/service"));
+    boost::shared_ptr<TTransport> httpSocket(new THttpClient(socket, host, "/service"));
     transport = httpSocket;
   } else if (transport_type.compare("framed") == 0){
-    shared_ptr<TFramedTransport> framedSocket(new TFramedTransport(socket));
+    boost::shared_ptr<TFramedTransport> framedSocket(new TFramedTransport(socket));
     transport = framedSocket;
   } else{
-    shared_ptr<TBufferedTransport> bufferedSocket(new TBufferedTransport(socket));
+    boost::shared_ptr<TBufferedTransport> bufferedSocket(new TBufferedTransport(socket));
     transport = bufferedSocket;
   }
 
   if (protocol_type.compare("json") == 0) {
-    shared_ptr<TProtocol> jsonProtocol(new TJSONProtocol(transport));
+    boost::shared_ptr<TProtocol> jsonProtocol(new TJSONProtocol(transport));
     protocol = jsonProtocol;
   } else{
-    shared_ptr<TBinaryProtocol> binaryProtocol(new TBinaryProtocol(transport));
+    boost::shared_ptr<TBinaryProtocol> binaryProtocol(new TBinaryProtocol(transport));
     protocol = binaryProtocol;
   }
 
@@ -205,9 +205,9 @@
     cout << "Libevent Features: 0x" << hex << event_base_get_features(base) << endl;
 #endif
 
-    shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
+    boost::shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
 
-    shared_ptr<TAsyncChannel> channel(new TEvhttpClientChannel(host.c_str(), "/", host.c_str(), port, base));
+    boost::shared_ptr<TAsyncChannel> channel(new TEvhttpClientChannel(host.c_str(), "/", host.c_str(), port, base));
     ThriftTestCobClient* client = new ThriftTestCobClient(channel, protocolFactory.get());
     client->testVoid(tr1::bind(testVoid_clientReturn, host.c_str(), port, base, protocolFactory.get(), std::tr1::placeholders::_1));
     
diff --git a/test/cpp/src/TestServer.cpp b/test/cpp/src/TestServer.cpp
index 456577f..b8cb880 100755
--- a/test/cpp/src/TestServer.cpp
+++ b/test/cpp/src/TestServer.cpp
@@ -360,7 +360,7 @@
 
 class TestHandlerAsync : public ThriftTestCobSvIf {
 public:
-  TestHandlerAsync(shared_ptr<TestHandler>& handler) : _delegate(handler) {}
+  TestHandlerAsync(boost::shared_ptr<TestHandler>& handler) : _delegate(handler) {}
   virtual ~TestHandlerAsync() {}
 
   virtual void testVoid(std::tr1::function<void()> cob) {
@@ -485,7 +485,7 @@
   }
 
 protected:
-  shared_ptr<TestHandler> _delegate;
+  boost::shared_ptr<TestHandler> _delegate;
 };
 
 
@@ -566,56 +566,56 @@
   }
 
   // Dispatcher
-  shared_ptr<TProtocolFactory> protocolFactory;
+  boost::shared_ptr<TProtocolFactory> protocolFactory;
   if (protocol_type == "json") {
-    shared_ptr<TProtocolFactory> jsonProtocolFactory(new TJSONProtocolFactory());
+    boost::shared_ptr<TProtocolFactory> jsonProtocolFactory(new TJSONProtocolFactory());
     protocolFactory = jsonProtocolFactory;
   } else {
-    shared_ptr<TProtocolFactory> binaryProtocolFactory(new TBinaryProtocolFactoryT<TBufferBase>());
+    boost::shared_ptr<TProtocolFactory> binaryProtocolFactory(new TBinaryProtocolFactoryT<TBufferBase>());
     protocolFactory = binaryProtocolFactory;
   }
 
   // Processor
-  shared_ptr<TestHandler> testHandler(new TestHandler());
-  shared_ptr<ThriftTestProcessor> testProcessor(new ThriftTestProcessor(testHandler));
+  boost::shared_ptr<TestHandler> testHandler(new TestHandler());
+  boost::shared_ptr<ThriftTestProcessor> testProcessor(new ThriftTestProcessor(testHandler));
   
   if (vm.count("processor-events")) {
-    testProcessor->setEventHandler(shared_ptr<TProcessorEventHandler>(
+    testProcessor->setEventHandler(boost::shared_ptr<TProcessorEventHandler>(
           new TestProcessorEventHandler()));
   }
   
   // Transport
-  shared_ptr<TSSLSocketFactory> sslSocketFactory;
-  shared_ptr<TServerSocket> serverSocket;
+  boost::shared_ptr<TSSLSocketFactory> sslSocketFactory;
+  boost::shared_ptr<TServerSocket> serverSocket;
 
   if (ssl) {
-    sslSocketFactory = shared_ptr<TSSLSocketFactory>(new TSSLSocketFactory());
+    sslSocketFactory = boost::shared_ptr<TSSLSocketFactory>(new TSSLSocketFactory());
     sslSocketFactory->loadCertificate("./server-certificate.pem");
     sslSocketFactory->loadPrivateKey("./server-private-key.pem");
     sslSocketFactory->ciphers("ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
-    serverSocket = shared_ptr<TServerSocket>(new TSSLServerSocket(port, sslSocketFactory));
+    serverSocket = boost::shared_ptr<TServerSocket>(new TSSLServerSocket(port, sslSocketFactory));
   } else {
 	if (domain_socket != "") {
 	  unlink(domain_socket.c_str());
-	  serverSocket = shared_ptr<TServerSocket>(new TServerSocket(domain_socket));
+	  serverSocket = boost::shared_ptr<TServerSocket>(new TServerSocket(domain_socket));
 	  port = 0;
 	}
 	else {
-      serverSocket = shared_ptr<TServerSocket>(new TServerSocket(port));
+      serverSocket = boost::shared_ptr<TServerSocket>(new TServerSocket(port));
 	}
   }
 
   // Factory
-  shared_ptr<TTransportFactory> transportFactory;
+  boost::shared_ptr<TTransportFactory> transportFactory;
   
   if (transport_type == "http" && server_type != "nonblocking") {
-    shared_ptr<TTransportFactory> httpTransportFactory(new THttpServerTransportFactory()); 
+    boost::shared_ptr<TTransportFactory> httpTransportFactory(new THttpServerTransportFactory()); 
     transportFactory = httpTransportFactory;
   } else if (transport_type == "framed") {
-    shared_ptr<TTransportFactory> framedTransportFactory(new TFramedTransportFactory()); 
+    boost::shared_ptr<TTransportFactory> framedTransportFactory(new TFramedTransportFactory()); 
     transportFactory = framedTransportFactory;
   } else {
-    shared_ptr<TTransportFactory> bufferedTransportFactory(new TBufferedTransportFactory()); 
+    boost::shared_ptr<TTransportFactory> bufferedTransportFactory(new TBufferedTransportFactory()); 
     transportFactory = bufferedTransportFactory;
   }
 
@@ -638,11 +638,11 @@
 
   } else if (server_type == "thread-pool") {
 
-    shared_ptr<ThreadManager> threadManager =
+    boost::shared_ptr<ThreadManager> threadManager =
       ThreadManager::newSimpleThreadManager(workers);
 
-    shared_ptr<PlatformThreadFactory> threadFactory =
-      shared_ptr<PlatformThreadFactory>(new PlatformThreadFactory());
+    boost::shared_ptr<PlatformThreadFactory> threadFactory =
+      boost::shared_ptr<PlatformThreadFactory>(new PlatformThreadFactory());
 
     threadManager->threadFactory(threadFactory);
 
@@ -667,9 +667,9 @@
 
   } else if (server_type == "nonblocking") {
     if(transport_type == "http") {
-      shared_ptr<TestHandlerAsync> testHandlerAsync(new TestHandlerAsync(testHandler));
-      shared_ptr<TAsyncProcessor> testProcessorAsync(new ThriftTestAsyncProcessor(testHandlerAsync));
-      shared_ptr<TAsyncBufferProcessor> testBufferProcessor(new TAsyncProtocolProcessor(testProcessorAsync, protocolFactory));
+      boost::shared_ptr<TestHandlerAsync> testHandlerAsync(new TestHandlerAsync(testHandler));
+      boost::shared_ptr<TAsyncProcessor> testProcessorAsync(new ThriftTestAsyncProcessor(testHandlerAsync));
+      boost::shared_ptr<TAsyncBufferProcessor> testBufferProcessor(new TAsyncProtocolProcessor(testProcessorAsync, protocolFactory));
       
       TEvhttpServer nonblockingServer(testBufferProcessor, port);
       nonblockingServer.serve();