2 #include "ace/OS_NS_stdio.h"
5 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
10 CORBA::ORB_var orb
= CORBA::ORB_init (argc
, argv
);
12 CORBA::Object_var poa_object
=
13 orb
->resolve_initial_references("RootPOA");
15 PortableServer::POA_var root_poa
=
16 PortableServer::POA::_narrow (poa_object
.in ());
18 if (CORBA::is_nil (root_poa
.in ()))
19 ACE_ERROR_RETURN ((LM_ERROR
,
20 " (%P|%t) Panic: nil RootPOA\n"),
23 Hello
*hello_impl
= 0;
24 ACE_NEW_RETURN (hello_impl
,
27 PortableServer::ServantBase_var
owner_transfer(hello_impl
);
29 Test::Hello_var hello
= hello_impl
->_this ();
32 "ERROR: Implicit activation should have "
33 "thrown an exception with CORBA e compact.\n"));
35 root_poa
->destroy (1, 1);
38 catch (const PortableServer::POA::WrongPolicy
&)
40 ACE_DEBUG ((LM_DEBUG
, "This test passes.\n"));
43 catch (const CORBA::Exception
& ex
)
45 ex
._tao_print_exception ("Exception caught:");