diff options
Diffstat (limited to 'TAO/tests/Two_Objects/worker.cpp')
-rw-r--r-- | TAO/tests/Two_Objects/worker.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/TAO/tests/Two_Objects/worker.cpp b/TAO/tests/Two_Objects/worker.cpp new file mode 100644 index 00000000000..ae0889a419a --- /dev/null +++ b/TAO/tests/Two_Objects/worker.cpp @@ -0,0 +1,33 @@ +// +// $Id$ +// + +#include "worker.h" + +Worker::Worker (CORBA::ORB_ptr orb, int time) + : orb_ (CORBA::ORB::_duplicate (orb)), + orb_timeout_(time) +{ +} + +int +Worker::svc (void) +{ + ACE_DECLARE_NEW_CORBA_ENV; + + ACE_TRY + { + ACE_Time_Value tv (orb_timeout_); + + // orb times out after <timeout> seconds + this->orb_->run (tv ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + ACE_CATCHANY + { + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + "Exception caught:"); + } + ACE_ENDTRY; + return 0; +} |