     1	#include <tango.h>
     2	
     3	int main(int argc,char *argv[])
     4	{
     5	
     6		Tango::Util *tg;
     7		
     8		try
     9		{
    10		
    11			tg = Tango::Util::init(argc,argv);
    12	
    13			tg->server_init();
    14	
    15			cout << "Ready to accept request" << endl;
    16			tg->server_run();
    17		}
    18		catch (bad_alloc)
    19		{
    20			cout << "Can't allocate memory!!!" << endl;
    21			cout << "Exiting" << endl;
    22		}
    23		catch (CORBA::Exception &e)
    24		{
    25			Tango::Except::print_exception(e);
    26			
    27			cout << "Received a CORBA::Exception" << endl;
    28			cout << "Exiting" << endl;
    29		}
    30	
    31		tg->server_cleanup();
    32			
    33		return(0);
    34	}
