From 64cbecddab9ce949dac4a2a74b8749ce77eaa5b6 Mon Sep 17 00:00:00 2001 From: Ossama Othman Date: Tue, 28 Aug 2001 18:42:32 +0000 Subject: ChangeLogTag:Tue Aug 28 11:31:58 2001 Ossama Othman --- TAO/ChangeLogs/ChangeLog-02a | 11 +++++++++++ TAO/tests/DLL_ORB/client.cpp | 10 ++++++++-- TAO/tests/DLL_ORB/server.cpp | 10 ++++++++-- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index 06d8b14c557..46053c7993d 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,14 @@ +Tue Aug 28 11:31:58 2001 Ossama Othman + + * tests/DLL_ORB/client.cpp (main): + * tests/DLL_ORB/server.cpp (main): + + Load the Resource_Factory before the test module. This forces + the Resource_Factory to exist longer than the dynamically loaded + ORB, thus allowing the ORB to make invocations on it during + destruction. Fixes a segmentation fault in both the client and + server binaries. + Tue Aug 28 12:28:58 2001 Chad Elliott * tests/TestUtils/TestCombinedThreads.cpp: diff --git a/TAO/tests/DLL_ORB/client.cpp b/TAO/tests/DLL_ORB/client.cpp index 70c797fe7d1..c3184b00c54 100644 --- a/TAO/tests/DLL_ORB/client.cpp +++ b/TAO/tests/DLL_ORB/client.cpp @@ -27,13 +27,19 @@ main (int, char *[]) // // In the process of doing this, the Test method provided by target // CORBA object will be invoked. - if (ACE_Service_Config::process_directive ("dynamic Client_Module Service_Object * Test_Client_Module:_make_Test_Client_Module() \"-k file://test.ior\"") != 0) + // + // Note that the Resource_Factory is loaded before the test client + // module. This forces the Resource_Factory to exist long enough + // for the ORB to be properly destroyed. The ORB requires that the + // Resource_Factory exist during ORB destruction. + if (ACE_Service_Config::process_directive ("dynamic Resource_Factory Service_Object * TAO:_make_TAO_Default_Resource_Factory() \"\"") != 0 + || ACE_Service_Config::process_directive ("dynamic Client_Module Service_Object * Test_Client_Module:_make_Test_Client_Module() \"-k file://test.ior\"") != 0) { ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ERROR: Client unable to process the " - "Service Configurator directive"), + "Service Configurator directive(s)"), -1); } diff --git a/TAO/tests/DLL_ORB/server.cpp b/TAO/tests/DLL_ORB/server.cpp index dcba4ca285c..745226d4c2d 100644 --- a/TAO/tests/DLL_ORB/server.cpp +++ b/TAO/tests/DLL_ORB/server.cpp @@ -27,12 +27,18 @@ main (int, char *[]) // // In the process of doing this, the Test CORBA object will be // activated, and the ORB will be run. - if (ACE_Service_Config::process_directive ("dynamic Server_Module Service_Object * Test_Server_Module:_make_Test_Server_Module() \"\"") != 0) + // + // Note that the Resource_Factory is loaded before the test server + // module. This forces the Resource_Factory to exist long enough + // for the ORB to be properly destroyed. The ORB requires that the + // Resource_Factory exist during ORB destruction. + if (ACE_Service_Config::process_directive ("dynamic Resource_Factory Service_Object * TAO:_make_TAO_Default_Resource_Factory() \"\"") != 0 + || ACE_Service_Config::process_directive ("dynamic Server_Module Service_Object * Test_Server_Module:_make_Test_Server_Module() \"\"") != 0) { ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ERROR: Server unable to process the " - "Service Configurator directive"), + "Service Configurator directive(s)"), -1); } -- cgit v1.2.1