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