Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tests / Portable_Interceptors / Collocated / Dynamic / test_i.cpp
blobbf3e91814a78026c7854bbde4a96bdd8d85aa50a
1 #include "test_i.h"
2 #include "ace/OS_NS_unistd.h"
4 Visual_i::Visual_i (CORBA::ORB_ptr orb)
5 : orb_ (CORBA::ORB::_duplicate (orb))
8 // ctor
10 void
11 Visual_i::normal (CORBA::Long)
13 // ACE_DEBUG ((LM_DEBUG, "Visual::normal called with %d\n", arg));
16 CORBA::Long
17 Visual_i::calculate (CORBA::Long one,
18 CORBA::Long two)
20 // ACE_DEBUG ((LM_DEBUG, "Visual::calculate\n"));
21 return (one + two);
24 void
25 Visual_i::user ()
27 // ACE_DEBUG ((LM_DEBUG, "Visual::user, throwning Silly\n"));
28 throw Test_Interceptors::Silly ();
31 void
32 Visual_i::system ()
34 // ACE_DEBUG ((LM_DEBUG, "Visual::user, throwing INV_OBJREF\n"));
35 throw CORBA::INV_OBJREF ();
38 void
39 Visual_i::shutdown ()
41 this->_remove_ref ();
43 // Give the client thread time to return from the collocated
44 // call to this method before shutting down the ORB. We sleep
45 // to avoid BAD_INV_ORDER exceptions on fast dual processor machines.
46 ACE_OS::sleep (1);
47 this->orb_->shutdown ();