Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / NestedUpcall / Triangle_Test / Object_B_i.cpp
blob0651d0b96d2c01a6dc14f0820643301be1505381
2 //=============================================================================
3 /**
4 * @file Object_B_i.cpp
6 * This class implements the Object B of the
7 * Nested Upcalls - Triangle test.
9 * @author Michael Kircher
11 //=============================================================================
14 #include "tao/Exception.h"
15 #include "Object_B_i.h"
16 #include "ace/OS_NS_unistd.h"
18 // CTOR
19 Object_B_i::Object_B_i (void)
23 // DTOR
24 Object_B_i::~Object_B_i (void)
30 void
31 Object_B_i::foo (Object_A_ptr theObject_A_ptr)
33 try
36 ACE_DEBUG ((LM_DEBUG,
37 "(%P|%t) BEGIN Object_B_i::foo: Trying to call Object A\n"));
39 theObject_A_ptr->finish ();
41 // Start to wait on this variable, it is set to true
42 // by the method finish ()
43 long int usecs = 500000;
44 ACE_Time_Value pause(0, usecs);
46 ACE_OS::sleep(pause);
49 catch (const CORBA::Exception& ex)
51 ex._tao_print_exception ("calling the initiator");
56 void
57 Object_B_i::shutdown (void)
59 int argc = 0;
60 ACE_TCHAR **argv = 0;
61 CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
63 orb->shutdown ();