diff options
-rw-r--r-- | TAO/tests/RTCORBA/Client_Propagated/server.cpp | 11 | ||||
-rw-r--r-- | TAO/tests/RTCORBA/Server_Protocol/server.cpp | 11 | ||||
-rw-r--r-- | TAO/tests/RTCORBA/Thread_Pool/server.cpp | 5 |
3 files changed, 23 insertions, 4 deletions
diff --git a/TAO/tests/RTCORBA/Client_Propagated/server.cpp b/TAO/tests/RTCORBA/Client_Propagated/server.cpp index 39018db44ae..ea19e9e43de 100644 --- a/TAO/tests/RTCORBA/Client_Propagated/server.cpp +++ b/TAO/tests/RTCORBA/Client_Propagated/server.cpp @@ -109,7 +109,9 @@ parse_args (int argc, char *argv[]) int main (int argc, char *argv[]) { - ACE_TRY_NEW_ENV + ACE_DECLARE_NEW_CORBA_ENV; + + ACE_TRY { // Standard initialization: // parse arguments and get all the references (ORB, @@ -124,10 +126,16 @@ main (int argc, char *argv[]) CORBA::Object_var object = orb->resolve_initial_references("RootPOA", ACE_TRY_ENV); ACE_TRY_CHECK; + PortableServer::POA_var root_poa = PortableServer::POA::_narrow (object.in (), ACE_TRY_ENV); ACE_TRY_CHECK; + if (CORBA::is_nil (root_poa)) + ACE_ERROR_RETURN ((LM_ERROR, + "ERROR: Panic <RootPOA> is nil\n"), + -1); + PortableServer::POAManager_var poa_manager = root_poa->the_POAManager (ACE_TRY_ENV); ACE_TRY_CHECK; @@ -233,4 +241,3 @@ main (int argc, char *argv[]) return 0; } - diff --git a/TAO/tests/RTCORBA/Server_Protocol/server.cpp b/TAO/tests/RTCORBA/Server_Protocol/server.cpp index 191335f0046..38caffc61f5 100644 --- a/TAO/tests/RTCORBA/Server_Protocol/server.cpp +++ b/TAO/tests/RTCORBA/Server_Protocol/server.cpp @@ -167,7 +167,9 @@ check_default_server_protocol (CORBA::ORB_ptr orb, int main (int argc, char *argv[]) { - ACE_TRY_NEW_ENV + ACE_DECLARE_NEW_CORBA_ENV; + + ACE_TRY { CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "", ACE_TRY_ENV); @@ -179,10 +181,16 @@ main (int argc, char *argv[]) CORBA::Object_var object = orb->resolve_initial_references("RootPOA", ACE_TRY_ENV); ACE_TRY_CHECK; + PortableServer::POA_var root_poa = PortableServer::POA::_narrow (object.in (), ACE_TRY_ENV); ACE_TRY_CHECK; + if (CORBA::is_nil (root_poa)) + ACE_ERROR_RETURN ((LM_ERROR, + "ERROR: Panic <RootPOA> is nil\n"), + -1); + PortableServer::POAManager_var poa_manager = root_poa->the_POAManager (ACE_TRY_ENV); ACE_TRY_CHECK; @@ -287,4 +295,3 @@ main (int argc, char *argv[]) return 0; } - diff --git a/TAO/tests/RTCORBA/Thread_Pool/server.cpp b/TAO/tests/RTCORBA/Thread_Pool/server.cpp index 45daea7d972..123d99f8260 100644 --- a/TAO/tests/RTCORBA/Thread_Pool/server.cpp +++ b/TAO/tests/RTCORBA/Thread_Pool/server.cpp @@ -76,6 +76,11 @@ main (int argc, char *argv[]) ACE_TRY_ENV); ACE_TRY_CHECK; + if (CORBA::is_nil (root_poa)) + ACE_ERROR_RETURN ((LM_ERROR, + "ERROR: Panic <RootPOA> is nil\n"), + -1); + PortableServer::POAManager_var poa_manager = root_poa->the_POAManager (ACE_TRY_ENV); ACE_TRY_CHECK; |