Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / tests / BiDirectional_NestedUpcall / test_i.cpp
blob8ac743bb37651b06cb035663b9b2b655ebf3808d
1 #include "test_i.h"
2 #include "tao/ORB_Core.h"
3 #include "tao/debug.h"
4 #include "tao/Transport_Cache_Manager.h"
5 #include "tao/Thread_Lane_Resources.h"
7 #if !defined(__ACE_INLINE__)
8 #include "test_i.inl"
9 #endif /* __ACE_INLINE__ */
11 void
12 Callback_i::shutdown ()
14 ACE_DEBUG ((LM_DEBUG, "Performing clean shutdown\n"));
15 this->orb_->shutdown (false);
18 void
19 Callback_i::callback_method (/**/)
21 if (TAO_debug_level > 0)
22 ACE_DEBUG ((LM_DEBUG, "Callback method called\n"));
26 // ****************************************************************
28 CORBA::Long
29 Simple_Server_i::test_method (CORBA::Boolean do_callback)
31 if (do_callback)
33 if (TAO_debug_level > 0)
34 ACE_DEBUG ((LM_DEBUG,
35 ACE_TEXT ("About to make a remote call in the Upcall\n")));
37 for (int times = 0;
38 times < this->no_iterations_;
39 ++times)
41 this->callback_->callback_method ();
43 if (this->orb_->orb_core ()->lane_resources ().transport_cache ().current_size () > 1)
45 ACE_ERROR ((LM_ERROR,
46 "(%P|%t) The cache has grown, aborting ..\n"));
48 ACE_OS::abort ();
53 return 0;
56 void
57 Simple_Server_i::callback_object (Callback_ptr callback
60 // Store the callback object
61 this->callback_ = Callback::_duplicate (callback);
65 void
66 Simple_Server_i::shutdown ()
68 this->orb_->shutdown (false);