Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / ForwardOnceUponException / test_i.cpp
blobc94f6f039f9e4d4323e3a8b74fa24b24cc73bbe5
1 #include "test_i.h"
3 #if !defined(__ACE_INLINE__)
4 #include "test_i.inl"
5 #endif /* __ACE_INLINE__ */
7 extern int raise_exception;
9 CORBA::Boolean
10 Simple_Server_i::test_is_a (const char * /* type */)
12 ++ this->ncalls_;
14 if ((raise_exception & TAO::FOE_OBJECT_NOT_EXIST) == TAO::FOE_OBJECT_NOT_EXIST)
16 //ACE_DEBUG ((LM_DEBUG, "(%P|%t) test_is_a called %d and raise OBJECT_NOT_EXIST\n", ncalls_));
17 throw ::CORBA::OBJECT_NOT_EXIST ();
20 if ((raise_exception & TAO::FOE_COMM_FAILURE) == TAO::FOE_COMM_FAILURE)
22 //ACE_DEBUG ((LM_DEBUG, "(%P|%t) test_is_a called %d and raise COMM_FAILURE\n", ncalls_));
23 throw ::CORBA::COMM_FAILURE ();
26 if ((raise_exception & TAO::FOE_TRANSIENT) == TAO::FOE_TRANSIENT)
28 //ACE_DEBUG ((LM_DEBUG, "(%P|%t) test_is_a called %d and raise TRANSIENT\n", ncalls_));
29 throw ::CORBA::TRANSIENT ();
32 if ((raise_exception & TAO::FOE_INV_OBJREF) == TAO::FOE_INV_OBJREF)
34 //ACE_DEBUG ((LM_DEBUG, "(%P|%t) test_is_a called %d and raise INV_OBJREF\n", ncalls_));
35 throw ::CORBA::INV_OBJREF ();
38 return 0;
41 void
42 Simple_Server_i::shutdown (void)
44 this->orb_->shutdown (0);