Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / Bug_3647_Regression / Middle_Impl.cpp
blobd63515c023c8f04b68adce75597a0c6e5152fae0
1 // -*- C++ -*-
2 #include "Middle_Impl.h"
4 Bug_3647_Regression::Middle_Impl::
5 Middle_Impl(
6 Backend_ptr backend,
7 CORBA::ORB_ptr orb,
8 bool verbose)
9 : POA_Bug_3647_Regression::Middle()
10 , backend_(Bug_3647_Regression::Backend::_duplicate(backend))
11 , orb_(CORBA::ORB::_duplicate(orb))
12 , verbose_(verbose)
16 void Bug_3647_Regression::Middle_Impl::
17 startup_test()
19 if (verbose_)
21 ACE_DEBUG ((LM_INFO,
22 "Middle_Impl::startup_test(%P|%t) - called\n"));
24 backend_->startup_test();
25 if (verbose_)
27 ACE_DEBUG ((LM_INFO,
28 "Middle_Impl::startup_test(%P|%t) - backend "
29 "startup call successful\n"));
31 backend_->freeze(10);
32 if (verbose_)
34 ACE_DEBUG ((LM_INFO,
35 "Middle_Impl::startup_test(%P|%t) - backend "
36 "freeze call successful\n"));
40 void Bug_3647_Regression::Middle_Impl::
41 ping()
43 if (verbose_)
45 ACE_DEBUG ((LM_INFO,
46 "Middle_Impl::ping(%P|%t) - called\n"));
48 try
50 Payload p;
51 p.length(1024);
52 backend_->ping(p);
54 catch(CORBA::TIMEOUT const & ex)
56 if (verbose_)
58 ACE_DEBUG ((LM_INFO,
59 "Middle_Impl::ping(%P|%t) - timeout raised\n"));
60 ex._tao_print_exception ("Exception caught:");
63 catch(CORBA::Exception const & ex)
65 ACE_DEBUG ((LM_INFO,
66 "Middle_Impl::ping(%P|%t) - unexpected exception raised\n"));
67 ex._tao_print_exception ("Exception caught:");
68 throw;
72 void Bug_3647_Regression::Middle_Impl::
73 shutdown()
75 if (verbose_)
77 ACE_DEBUG ((LM_INFO,
78 "Middle_Impl::shutdown(%P|%t) - called\n"));
80 backend_->shutdown();
81 if (verbose_)
83 ACE_DEBUG ((LM_INFO,
84 "Middle_Impl::shutdown(%P|%t) - call to backend was completed\n"));
86 orb_->shutdown (false);
87 if (verbose_)
89 ACE_DEBUG ((LM_INFO,
90 "Middle_Impl::shutdown(%P|%t) - call to ORB was completed\n"));