Merge pull request #2222 from jwillemsen/jwi-dllexportwarning
[ACE_TAO.git] / TAO / tests / ForwardOnceUponException / test_i.cpp
blob3060c08666a63a78a4b085f37c8d3cd4a6a849f7
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 ()
44 this->orb_->shutdown (false);