blob: 1a5a373af980fa8387c825fdb071baa64f52fde9 (
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
|
//
// $Id$
//
#include "Hello.h"
ACE_RCSID(Hello, Hello, "$Id$")
Hello::Hello (CORBA::ORB_ptr orb)
: orb_ (CORBA::ORB::_duplicate (orb))
{
}
char *
Hello::get_string (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Received call back !!!\n"));
return CORBA::string_dup ("Hello there!");
}
void
Hello::shutdown (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
}
void
Hello::request_callback (Test::Hello_ptr call_me ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Making call back !!!\n"));
ACE_TRY
{
CORBA::String_var result = call_me->get_string ();
}
ACE_CATCHANY
{
ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
"Exception attempting to callback client obj ref: \n");
ACE_RE_THROW;
}
ACE_ENDTRY;
ACE_DEBUG ((LM_DEBUG, "(%P|%t) - Call back succeeded !!!\n"));
}
|