Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tests / Portable_Interceptors / AdvSlotDblCpy / client.cpp
blob10dfa7e3653efbc166cdcdb51505dbf8f8224e39
1 // author : Boris Kolpackov <boris@dre.vanderbilt.edu>
2 #include "InvokeMeC.h"
4 namespace
6 class always
8 const InvokeMe_ptr server_;
9 public:
10 always(const InvokeMe_ptr x):server_(x) {}
11 ~always()
13 ACE_DEBUG ((LM_DEBUG, "\n"));
14 server_->shutdown ();
19 int
20 ACE_TMAIN(int argc, ACE_TCHAR *argv[])
22 try
24 CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
26 if (argc != 2)
28 ACE_DEBUG ((LM_ERROR, "Usage: %s <ior>\n", argv[0]));
29 return -1;
32 CORBA::Object_var obj = orb->string_to_object (argv[1]);
33 InvokeMe_var server = InvokeMe::_narrow (obj.in ());
35 always Shutdown( server.in ()); // When goes out of scope!
36 server->invoke_me ();
37 ACE_DEBUG ((LM_DEBUG, "\n"));
38 server->invoke_me ();
40 catch (const ::CORBA::Exception &ex)
42 ex._tao_print_exception ("ERROR : unexpected CORBA exception caught : ");
43 return 1;
46 return 0;