2 #include "tao/ORB_Core.h"
4 #include "tao/Transport_Cache_Manager.h"
5 #include "tao/Thread_Lane_Resources.h"
6 #include "ace/Reactor.h"
8 #if !defined(__ACE_INLINE__)
10 #endif /* __ACE_INLINE__ */
13 Callback_i::shutdown ()
15 ACE_DEBUG ((LM_DEBUG
, "Performing clean shutdown\n"));
16 // Shutdown the server before we shutdown our own ORB
17 this->server_
->shutdown ();
19 this->orb_
->shutdown (false);
23 Callback_i::callback_method ()
25 if (TAO_debug_level
> 0)
26 ACE_DEBUG ((LM_DEBUG
, "Callback method called\n"));
30 // ****************************************************************
33 Simple_Server_i::handle_timeout (const ACE_Time_Value
&,
36 if (TAO_debug_level
> 0)
38 ACE_TEXT ("About to make a remote call in the Upcall\n")));
41 times
< this->no_iterations_
;
44 this->callback_
->callback_method ();
46 if (this->orb_
->orb_core ()->lane_resources ().transport_cache ().current_size () > 1)
49 "(%P|%t) The cache has grown, aborting ..\n"));
55 this->callback_
->shutdown ();
61 Simple_Server_i::test_method (CORBA::Boolean do_callback
)
65 // Scheduling ourselves for doing the callbacks
66 if (TAO_debug_level
> 0)
68 ACE_TEXT ("Scheduling for callback\n")));
70 if (this->orb_
->orb_core ()->reactor ()->schedule_timer (this,
72 ACE_Time_Value (1)) == -1)
75 "(%P|%t) Can't schedule timers, aborting ..\n"));
85 Simple_Server_i::callback_object (Callback_ptr callback
88 // Store the callback object
89 this->callback_
= Callback::_duplicate (callback
);
94 Simple_Server_i::shutdown ()
96 this->orb_
->shutdown (false);