     1	#include <myservice.h>
     2	#include <tango.h>
     3	
     4	using namespace std;
     5	
     6	MYService::MYService(char *exec_name):NTService(exec_name)
     7	{
     8	}
     9	
    10	void MYService::start(int argc,char **argv,Tango::NTEventLogger *logger)
    11	{
    12		Tango::Util *tg;
    13		try
    14		{
    15			Tango::Util::_service = true;
    16	
    17			tg = Tango::Util::init(argc,argv);
    18	
    19	                tg->server_init();
    20	
    21			tg->server_run();
    22		}
    23		catch (bad_alloc)
    24		{
    25			logger->error("Can't allocate memory to store device object");
    26		}
    27		catch (Tango::DevFailed &e)
    28		{
    29			logger->error(e.errors[0].desc.in());
    30		}
    31		catch (CORBA::Exception &)
    32		{
    33			logger->error("CORBA Exception");
    34		}
    35	}
