2 #include "tao/ORB_Core.h"
4 #include "tao/Transport_Cache_Manager.h"
5 #include "tao/Thread_Lane_Resources.h"
6 #include "ace/Auto_Event.h"
8 Second_i::Second_i (CORBA::ORB_ptr orb
,
9 CORBA::ULong len
, ACE_Auto_Event
&two_way_done
)
10 : orb_ (CORBA::ORB::_duplicate (orb
)),
12 two_way_done_(two_way_done
)
16 Two_Objects_Test::Octet_Seq
*
17 Second_i::twoway_method ()
19 Two_Objects_Test::Octet_Seq
*preply_mesg
= 0;
21 ACE_NEW_THROW_EX (preply_mesg
,
22 Two_Objects_Test::Octet_Seq (this->length_
),
25 Two_Objects_Test::Octet_Seq_var reply_var
=
27 reply_var
->length (this->length_
);
30 "Twoway servant : (%P|%t) two way method called.\n"));
32 // @@ This will not work with the latest copy of ACE+TAO :-). Irfan
33 // has moved the cache somewhere else. You may want to check the
34 // latest code in BiDir cals again ;)
35 // @@ Try to use the current_size () instead of total_size ()
36 ACE_ASSERT(this->orb_
->orb_core ()->lane_resources().
37 transport_cache ().current_size () == 1);
40 "Twoway servant : (%P|%t) about to signal one way thread.\n"));
42 two_way_done_
.signal ();
44 return reply_var
._retn ();
50 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) about to shutdown the orb\n"));
51 this->orb_
->shutdown (false);