blob: 1d948cf240c14f2708faca0fa468475aaa868bf8 (
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
// $Id$
#include "test_i.h"
#if !defined(__ACE_INLINE__)
#include "test_i.i"
#endif /* __ACE_INLINE__ */
ACE_RCSID(BiDirectional_NestedUpcall, test_i, "$Id$")
void
Callback_i::shutdown (CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_DEBUG ((LM_DEBUG, "Performing clean shutdown\n"));
this->orb_->shutdown (0, ACE_TRY_ENV);
}
void
Callback_i::callback_method (CORBA::Environment & /*ACE_TRY_ENV*/)
ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_DEBUG ((LM_DEBUG, "Callback method called \n"));
}
// ****************************************************************
CORBA::Long
Simple_Server_i::test_method (CORBA::Boolean do_callback,
CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException))
{
if (do_callback)
{
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("About to make a remote call in the Upcall \n")));
for (int times = 0;
times < this->no_iterations_;
++times)
{
this->callback_->callback_method (ACE_TRY_ENV);
ACE_CHECK_RETURN (0);
ACE_ASSERT(this->orb_->orb_core ()->transport_cache ().total_size () > 1);
}
}
return 0;
}
void
Simple_Server_i::callback_object (Callback_ptr callback,
CORBA::Environment& )
ACE_THROW_SPEC ((CORBA::SystemException))
{
// Store the callback object
this->callback_ = Callback::_duplicate (callback);
}
void
Simple_Server_i::shutdown (CORBA::Environment& ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException))
{
this->orb_->shutdown (0, ACE_TRY_ENV);
}
|