2 #include "ace/OS_NS_time.h"
3 #include "ace/OS_NS_string.h"
5 Middle_i::Middle_i (CORBA::ORB_ptr orb
, ThreeTier_ptr target
)
6 : orb_(CORBA::ORB::_duplicate (orb
))
7 , target_(ThreeTier::_duplicate (target
))
9 // ACE_DEBUG((LM_DEBUG, "Middle (%P|%t) Construct middle_i @%8.8x\n", this));
12 Middle_i::~Middle_i ()
18 Middle_i::parse_args(int /*argc*/ , ACE_TCHAR
* /*argv*/[] )
23 // Implement the tick method
28 ACE_DEBUG((LM_DEBUG
, "Middle (%P|%t) tick.\n"));
33 catch (const CORBA::UserException
& userex
)
35 userex
._tao_print_exception ("MIDDLE::tick User Exception in run");
37 catch (const CORBA::SystemException
& sysex
)
39 sysex
._tao_print_exception ("MIDDLE::tick System Exception in run");
46 ACE_DEBUG((LM_DEBUG
, "Middle (%P|%t) tock.\n"));
51 catch (const CORBA::UserException
& userex
)
53 userex
._tao_print_exception ("MIDDLE::tock User Exception in run");
56 catch (const CORBA::SystemException
& sysex
)
58 sysex
._tao_print_exception ("MIDDLE::tock System Exception in run");
64 Middle_i::tickCount ()
66 ACE_DEBUG((LM_DEBUG
, "Middle (%P|%t) tickCount.\n"));
69 return target_
->tickCount();
71 catch (const CORBA::UserException
& userex
)
73 userex
._tao_print_exception ("MIDDLE::tickCount User Exception in run");
76 catch (const CORBA::SystemException
& sysex
)
78 sysex
._tao_print_exception ("MIDDLE::tickCount System Exception in run");
84 Middle_i::tockCount ()
86 ACE_DEBUG((LM_DEBUG
, "Middle (%P|%t) tockCount.\n"));
89 return target_
->tockCount();
91 catch (const CORBA::UserException
& userex
)
93 userex
._tao_print_exception ("MIDDLE::tockCount User Exception in run");
96 catch (const CORBA::SystemException
& sysex
)
98 sysex
._tao_print_exception ("MIDDLE::tockCount System Exception in run");
107 Middle_i::shutdown ()
109 ACE_DEBUG((LM_DEBUG
, "Middle (%P|%t) shutdown.\n"));
111 ACE_DEBUG ((LM_DEBUG
, "Middle_i is shutting down"));
113 // Instruct the ORB to shutdown.
114 this->orb_
->shutdown (false);