blob: 854a9f0ce16621727d785ec6c8f8c5bd0a40527f (
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
|
#include "ami_ccm_i.h"
#include "tao/debug.h"
ACE_RCSID(AMI, ami_test_i, "$Id$")
AMI_CCM_i::AMI_CCM_i (CORBA::ORB_ptr orb)
: orb_ (CORBA::ORB::_duplicate (orb)),
answer_count_ (0)
{
}
void
AMI_CCM_i::asynch_foo (const char* string, ::CORBA::String_out answer)
{
try
{
ACE_OS::sleep (1);
++answer_count_;
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("%N:%l:(%P:%t):AMI_CCM_i::foo: %d %C\n"),
answer_count_,
string));
char tmp[255] = {0};
ACE_OS::sprintf(tmp, "Hello World %d", answer_count_);
answer = CORBA::string_dup (tmp);
}
catch (const CORBA::Exception& e)
{
throw A::InternalError (123, ACE_TEXT ("CORBA exception"));
}
catch (...)
{
throw A::InternalError (456, ACE_TEXT ("Unknow exception"));
}
//answer = answer_count_;
}
void
AMI_CCM_i::shutdown (void)
{
this->orb_->shutdown (0);
}
|