Index: trunk/GnssCenter/thrift/test2/server.cpp
===================================================================
--- trunk/GnssCenter/thrift/test2/server.cpp	(revision 4951)
+++ trunk/GnssCenter/thrift/test2/server.cpp	(revision 4952)
@@ -19,15 +19,6 @@
 using namespace apache::thrift::concurrency;
 
-class myService : virtual public myServiceIf {
- public:
-  myService() {}
-  void answer(const std::string& question) {
-    // implemented on the client-side only
-  }
-};
-
 class t_connection {
  public:
-  shared_ptr<myService>       _service;
   shared_ptr<myServiceClient> _client;
   shared_ptr<TProcessor>      _processor;
@@ -44,10 +35,9 @@
   shared_ptr<TProcessor>   getProcessor(const TConnectionInfo& info) {
     shared_ptr<myServiceClient> client(new myServiceClient(info.output));
-    shared_ptr<myService>       service(new myService());
-    shared_ptr<TProcessor>      processor(new myServiceProcessor(service));
-    cout << "connection " << endl;
+    shared_ptr<TProcessor>      processor(new myServiceProcessor(client));
+
+    cout << "new connection " << endl;
 
     CONNECTION.reset(new t_connection);   
-    CONNECTION->_service     = service;
     CONNECTION->_client      = client;
     CONNECTION->_processor   = processor;
@@ -86,13 +76,13 @@
   thread->start();
 
-  cout << "server thread started" << endl;
-
-  while (true) {
-    cout << "sleep ..." << endl;
-    if (CONNECTION) {
-      cout << "CONNECTION " << endl;
-      CONNECTION->_client->answer("How are you?");
+  try {
+    while (true) {
+      if (CONNECTION) {
+        CONNECTION->_client->answer("How are you?");
+      }
+      sleep(1);
     }
-    sleep(1);
+  } catch (TException& exc) {
+    cout << "Exception: " << exc.what() << endl;
   }
 
