blob: a0c0d58c9f889a4cc4c489fa63f0e9a9217f2a88 (
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
|
//
// $Id$
//
#include "worker.h"
Worker::Worker (CORBA::ORB_ptr orb, int time)
: orb_ (CORBA::ORB::_duplicate (orb)),
timeout_(time)
{
}
int
Worker::svc (void)
{
TAO_ENV_DECLARE_NEW_ENV;
ACE_TRY
{
ACE_Time_Value tv (timeout_);
///orb times out after <timeout> seconds
this->orb_->run (tv TAO_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
{
ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
"Exception caught:");
}
ACE_ENDTRY;
return 0;
}
|