Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / Bug_3926_Regression / test_i.cpp
blobf0afd143e1c3b44c1d139b8049882744324b29ca
1 // -*- C++ -*-
2 #include "test_i.h"
4 test_i::test_i (CORBA::Short num,
5 CORBA::ORB_ptr orb)
6 : number_ (num),
7 orb_ (CORBA::ORB::_duplicate (orb))
11 test_i::~test_i (void)
15 CORBA::Short
16 test_i::number (void)
18 ++this->number_;
19 if (this->number_ == 3)
21 #if 1
22 // Either throw any of these 4 exceptions with completion status
23 // COMPLETED_NO and see how it's handled in receive_other() point.
24 throw ::CORBA::TRANSIENT (0, CORBA::COMPLETED_NO);
25 // throw ::CORBA::NO_RESPONSE (0, CORBA::COMPLETED_NO);
26 // throw ::CORBA::COMM_FAILURE (0, CORBA::COMPLETED_NO);
27 // throw ::CORBA::OBJ_ADAPTER (0, CORBA::COMPLETED_NO);
28 #else
29 // Or throw any other exception and see how it's handled in
30 // receive_exception() point on the client side.
31 throw ::CORBA::INTERNAL (0, CORBA::COMPLETED_NO);
32 #endif
34 return this->number_;
37 void
38 test_i::shutdown (void)
40 ACE_DEBUG ((LM_DEBUG,
41 "SERVER: Server is shutting down at %d.\n",
42 this->number_));
43 this->orb_->shutdown (0);