? Test Index: Test.cpp =================================================================== RCS file: /project/cvs-repository/ACE_wrappers-repository/TAO/tests/ORB_Local_Config/Bug_1459/Test.cpp,v retrieving revision 1.10 diff -u -r1.10 Test.cpp --- Test.cpp 30 May 2006 19:20:56 -0000 1.10 +++ Test.cpp 30 Jun 2006 20:24:05 -0000 @@ -6,39 +6,29 @@ // bugzilla 1459) and the different scenarios minus the creation of // the servant the service manager or threads even without the servant // to demonstrate that the server is capable of responding (which in -// some cases it isnt) problems can allready be seen in the multiple -// orb scenarios AB b isnt prompted for a new certificate password, MA -// ssliop isnt loaded at all etc - +// some cases it isnt) problems can already be seen in the multiple +// orb scenarios #include "tao/corba.h" #include "ace/ARGV.h" #include "ace/Dynamic_Service.h" /// The combination of orb instances and their configurations to test -#define MORB_MA ACE_RCSID (tests, server, "$Id: Test.cpp,v 1.10 2006/05/30 19:20:56 mesnier_p Exp $") - #include "Service_Configuration_Per_ORB.h" -const char argA[] = "AAA -ORBId ORB-A -ORBSvcConf a.conf"; - -// dynamic SSLIOP_Factory Service_Object * TAO_SSLIOP:_make_TAO_SSLIOP_Protocol_Factory() "-SSLAuthenticate SERVER_AND_CLIENT -SSLPrivateKey PEM:server_key.pem -SSLCertificate PEM:server_cert.pem"; -// static Resource_Factory "-ORBProtocolFactory SSLIOP_Factory" - -const char argB[] = "BBB -ORBSvcConf b.conf"; +const char argA[] = "AAA -ORBId ORB-A -ORBSvcConf a.conf " +"-ORBListenEndpoints shmiop://54321"; -// dynamic SSLIOP_Factory Service_Object * TAO_SSLIOP:_make_TAO_SSLIOP_Protocol_Factory() "-SSLAuthenticate SERVER_AND_CLIENT -SSLPrivateKey PEM:client_key.pem -SSLCertificate PEM:client_cert.pem" -// static Resource_Factory "-ORBProtocolFactory SSLIOP_Factory" +//contents of a.conf: +// dynamic SHMIOP_Factory Service_Object* TAO_Strategies:_make_TAO_SHMIOP_Protocol_Factory () "" +// dynamic Advanced_Resource_Factory Service_Object* TAO_Strategies:_make_TAO_Advanced_Resource_Factory () "-ORBProtocolFactory SHMIOP_Factory" const char argM[] = "MMM -ORBId ORB-M -ORBSvcConf m.conf"; -// dynamic UIPMC_Factory Service_Object * TAO_PortableGroup:_make_TAO_UIPMC_Protocol_Factory() "" -// static Resource_Factory "-ORBProtocolFactory IIOP_Factory -ORBProtocolFactory UIPMC_Factory" -// #static PortableGroup_Loader "" -// dynamic PortableGroup_Loader Service_Object * TAO_PortableGroup:_make_TAO_PortableGroup_Loader() "" +// m.conf is an empty svc.conf file int testBug1459 (int , ACE_TCHAR *[]) @@ -46,89 +36,52 @@ ACE_TRACE ("testBug1459"); try - { - -#ifdef MORB_AB - ACE_ARGV arg0(argA); - int n = arg0.argc(); - CORBA::ORB_var ORBA = CORBA::ORB_init(n,arg0.argv()); - - ACE_ARGV arg1(argB); - n = arg1.argc(); - CORBA::ORB_var ORBB = CORBA::ORB_init(n,arg1.argv()); -#else - ACE_UNUSED_ARG (argA); - ACE_UNUSED_ARG (argB); -#endif /* MORB_AB */ - - - -#ifdef MORB_AM - ACE_ARGV arg0(argA); - int n = arg0.argc(); - CORBA::ORB_var ORBA = CORBA::ORB_init(n,arg0.argv()); - - ACE_ARGV arg1(argM); - n = arg1.argc(); - CORBA::ORB_var ORBB = CORBA::ORB_init(n,arg1.argv()); -#else - ACE_UNUSED_ARG (argA); - ACE_UNUSED_ARG (argM); -#endif /* MORB_AM */ - - - -#ifdef MORB_MA - int n = 0; - ACE_ARGV arg0(argM); - n = arg0.argc(); - CORBA::ORB_var ORBA = CORBA::ORB_init(n, arg0.argv()); - if (ORBA.in () == 0) - ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Expected to get an ORB\n")), -1); - - ACE_ARGV arg1(argA); - n = arg1.argc(); - CORBA::ORB_var ORBB = CORBA::ORB_init(n, arg1.argv()); - if (ORBB.in () == 0) - ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Expected to get a second ORB\n")), -1); - - if (ORBA.in () == ORBB.in ()) - ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Unexpected to find the two ORBs the same\n")), -1); - - // Look ma!! No ... services?! - - ACE_Service_Object *so = 0; - int error = 0; - so = ACE_Dynamic_Service::instance ("SSLIOP_Factory"); - if (so != 0) - { - error++; - ACE_ERROR ((LM_DEBUG, - ACE_TEXT("Unexpected to find SSLIOP_Factory globally\n"))); - } - - so = ACE_Dynamic_Service::instance ("UIPMC_Factory"); - if (so != 0) - { - error++; - ACE_ERROR ((LM_DEBUG, - ACE_TEXT("Unexpected to find ") - ACE_TEXT("UIPMC_Factory globally\n"))); - } - - // Since each svc conf file causes the ORB to load the services in - // its own service space no services are reachable through the - // global service repo + { + int n = 0; + ACE_ARGV arg0(argM); + n = arg0.argc(); + CORBA::ORB_var ORBM = CORBA::ORB_init(n, arg0.argv()); + if (ORBM.in () == 0) + ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Expected to get an ORB\n")), + -1); + + ACE_ARGV arg1(argA); + n = arg1.argc(); + CORBA::ORB_var ORBA = CORBA::ORB_init(n, arg1.argv()); + if (ORBA.in () == 0) + ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Expected to get a second " + "ORB\n")), -1); + + if (ORBA.in () == ORBM.in ()) + ACE_ERROR_RETURN ((LM_DEBUG, ACE_TEXT("Unexpected to find the two ORBs" + " the same\n")), -1); + + // Look ma!! No ... services?! + + ACE_Service_Object *so = 0; + int error = 0; + so = + ACE_Dynamic_Service::instance ("SHMIOP_Factory"); + if (so != 0) + { + error++; + ACE_ERROR ((LM_DEBUG, + ACE_TEXT("Unexpected to find SSLIOP_Factory " + "globally\n"))); + } + + // Since each svc conf file causes the ORB to load the services in + // its own service space no services are reachable through the + // global service repo - ORBA->destroy(); + ORBM->destroy(); - ORBB->destroy(); + ORBA->destroy(); - if (error > 0) - return -1; -#endif /* MORB_MA */ + if (error > 0) + return -1; - } + } catch(const CORBA::Exception& ex) { ACE_PRINT_EXCEPTION (ex, "Unhandled exception caught"); Index: a.conf =================================================================== RCS file: /project/cvs-repository/ACE_wrappers-repository/TAO/tests/ORB_Local_Config/Bug_1459/a.conf,v retrieving revision 1.2 diff -u -r1.2 a.conf --- a.conf 22 Jun 2006 18:26:56 -0000 1.2 +++ a.conf 30 Jun 2006 20:24:05 -0000 @@ -1,2 +1,3 @@ -dynamic UIOP_Factory Service_Object * TAO_Strategies:_make_TAO_UIOP_Protocol_Factory() "" -dynamic Advanced_Resource_Factory Service_Object * TAO_Strategies:_make_TAO_Advanced_Resource_Factory () "-ORBProtocolFactory UIOP_Factory" +dynamic SHMIOP_Factory Service_Object* TAO_Strategies:_make_TAO_SHMIOP_Protocol_Factory () "" + +dynamic Advanced_Resource_Factory Service_Object* TAO_Strategies:_make_TAO_Advanced_Resource_Factory () "-ORBProtocolFactory SHMIOP_Factory" Index: b.conf =================================================================== RCS file: b.conf diff -N b.conf --- b.conf 28 Apr 2006 22:06:57 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,3 +0,0 @@ -dynamic SSLIOP_Factory Service_Object * TAO_SSLIOP:_make_TAO_SSLIOP_Protocol_Factory() "-SSLAuthenticate SERVER_AND_CLIENT -SSLPrivateKey PEM:client_key.pem -SSLCertificate PEM:client_cert.pem" -static Resource_Factory "-ORBProtocolFactory SSLIOP_Factory" - Index: m1.conf =================================================================== RCS file: m1.conf diff -N m1.conf --- m1.conf 28 Apr 2006 22:06:57 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,4 +0,0 @@ -dynamic PortableGroup_Loader Service_Object * TAO_PortableGroup:_make_TAO_PortableGroup_Loader() "" -dynamic UIPMC_Factory Service_Object * TAO_PortableGroup:_make_TAO_UIPMC_Protocol_Factory() "" -static Resource_Factory "-ORBProtocolFactory IIOP_Factory -ORBProtocolFactory UIPMC_Factory" - Index: server_cert.pem =================================================================== RCS file: server_cert.pem diff -N server_cert.pem --- server_cert.pem 28 Apr 2006 22:06:57 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,16 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICeDCCAiKgAwIBAgIBADANBgkqhkiG9w0BAQQFADBjMQswCQYDVQQGEwJVUzEL -MAkGA1UECBMCTU8xDDAKBgNVBAcTA1NUTDELMAkGA1UEChMCV1UxDDAKBgNVBAsT -A0RPQzELMAkGA1UEAxMCS0ExETAPBgkqhkiG9w0BCQEWAktBMB4XDTAxMDgyNzE2 -NTUxMVoXDTAxMDkyNjE2NTUxMVowYzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAk1P -MQwwCgYDVQQHEwNTVEwxCzAJBgNVBAoTAldVMQwwCgYDVQQLEwNET0MxCzAJBgNV -BAMTAktBMREwDwYJKoZIhvcNAQkBFgJLQTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgC -QQD12e2DchVPE/D1YrTcGZncLnOLRuuFf5Q2B55s6JZhT0OoLyNrqCgUHh3iRTyO -iyeUxm/IQp8qcvs23Pqb3vLxAgMBAAGjgcAwgb0wHQYDVR0OBBYEFL8LnC8csuIX -+TUw6FCoReB27PHoMIGNBgNVHSMEgYUwgYKAFL8LnC8csuIX+TUw6FCoReB27PHo -oWekZTBjMQswCQYDVQQGEwJVUzELMAkGA1UECBMCTU8xDDAKBgNVBAcTA1NUTDEL -MAkGA1UEChMCV1UxDDAKBgNVBAsTA0RPQzELMAkGA1UEAxMCS0ExETAPBgkqhkiG -9w0BCQEWAktBggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADQQAZP9CT -TVRxAz3Acxxxn32rsnwSeNJr1uTA4hew7f4QZ187oZia+rcFLOILrwgCmtqEmWVj -dj6COUrqKo60BI5V ------END CERTIFICATE----- Index: server_key.pem =================================================================== RCS file: server_key.pem diff -N server_key.pem --- server_key.pem 28 Apr 2006 22:06:57 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,9 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIBOwIBAAJBAPXZ7YNyFU8T8PVitNwZmdwuc4tG64V/lDYHnmzolmFPQ6gvI2uo -KBQeHeJFPI6LJ5TGb8hCnypy+zbc+pve8vECAwEAAQJAE/fmZbW/a1PYT2X8AKCH -sa2ILvjMqmQpWpYV1QyzIiYQPEmQ/5GMUj/t3PZd/17BOH8aPakBT/c1Gp+os6vR -zQIhAP2RDmm6UyMrJhAtAcNC5s8nbfhKPG80Q0DZ2kiodjQfAiEA+DXqwEZlCh0j -VPzEXY7vrdQa641zQ5XIX1S/+WbCdu8CIDT9m4V86uLuoYW/4h5sXM/t7Y119itH -QMbMwFFu40UBAiEA9z+mN6An2BpMbsVXyiavREYMBuahkgprTeM7VHHzdssCIQCY -QEgmpzGzfdZoREy9B7ooNeRO919lR9qvbte9vvJvWQ== ------END RSA PRIVATE KEY-----