diff options
author | harris_s <harris_s@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-01-21 23:34:52 +0000 |
---|---|---|
committer | harris_s <harris_s@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-01-21 23:34:52 +0000 |
commit | 4c84d984663ed61a4363162c93087e43997c71ef (patch) | |
tree | d665edbb8a770c0e0c55872a0590a42006d035df /TAO/orbsvcs | |
parent | 3ffa9116223716bce04e610089649f4960ac0e06 (diff) | |
download | ATCD-4c84d984663ed61a4363162c93087e43997c71ef.tar.gz |
Wed Jan 21 16:35:47 2004 Scott Harris <harris_s@ociweb.com>
Diffstat (limited to 'TAO/orbsvcs')
10 files changed, 59 insertions, 28 deletions
diff --git a/TAO/orbsvcs/orbsvcs/IFRService/IFR_Service_Utils.cpp b/TAO/orbsvcs/orbsvcs/IFRService/IFR_Service_Utils.cpp index 4436b158f57..cc25565cbd5 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/IFR_Service_Utils.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/IFR_Service_Utils.cpp @@ -116,7 +116,7 @@ TAO_IFR_Server::init_with_orb (int argc, return retval; } - if (use_multicast_server) + if (use_multicast_server || OPTIONS::instance()->support_multicast_discovery ()) { retval = this->init_multicast_server (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; diff --git a/TAO/orbsvcs/orbsvcs/IFRService/Options.cpp b/TAO/orbsvcs/orbsvcs/IFRService/Options.cpp index 1fdc6af1e94..b9eef787c67 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/Options.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/Options.cpp @@ -12,7 +12,8 @@ Options::Options () persistent_ (0), persistent_file_ (ACE_OS::strdup ("ifr_default_backing_store")), using_registry_ (0), - enable_locking_ (0) + enable_locking_ (0), + support_multicast_(0) { } @@ -25,7 +26,7 @@ Options::~Options () int Options::parse_args (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt get_opts (argc, argv, "o:pb:mr"); + ACE_Get_Opt get_opts (argc, argv, "o:pb:lm:r"); int c; while ((c = get_opts ()) != -1) @@ -41,7 +42,7 @@ Options::parse_args (int argc, ACE_TCHAR *argv[]) case 'b': this->persistent_file_ = get_opts.opt_arg (); break; - case 'm': + case 'l': #if defined (ACE_HAS_THREADS) this->enable_locking_ = 1; #endif /* ACE_HAS_THREADS */ @@ -59,13 +60,17 @@ Options::parse_args (int argc, ACE_TCHAR *argv[]) 1 ); #endif /* ACE_WIN32 */ + case 'm': + this->support_multicast_ = ACE_OS::atoi(get_opts.opt_arg ()); + break; case '?': // display help for use of the server. default: ACE_ERROR_RETURN ((LM_ERROR, "Usage: %s" " [-o] <ior_output_file>" " [-r]" - " [-m]" + " [-l]" + " [-m] <0|1>" " [-p]" " [-b] <persistence_file>" "\n", @@ -107,6 +112,12 @@ Options::enable_locking (void) const return this->enable_locking_; } +int +Options::support_multicast_discovery (void) const +{ + return this->support_multicast_; +} + #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) template class ACE_Singleton <Options, ACE_Null_Mutex>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) diff --git a/TAO/orbsvcs/orbsvcs/IFRService/Options.h b/TAO/orbsvcs/orbsvcs/IFRService/Options.h index 67f7bc575d4..108374495d8 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/Options.h +++ b/TAO/orbsvcs/orbsvcs/IFRService/Options.h @@ -58,6 +58,9 @@ public: int enable_locking (void) const; // Should the repository have a real mutex or a null mutex? + int support_multicast_discovery (void) const; + // should the service support discovery via multicast? + private: char *ior_output_file_; // File where the IOR of the server object is stored. @@ -73,6 +76,9 @@ private: int enable_locking_; // Should the repository have a real mutex or a null mutex? + + int support_multicast_; + // If not zero multicast is enabled. }; // Typedef an Options Singleton. diff --git a/TAO/orbsvcs/tests/InterfaceRepo/Application_Test/run_test.pl b/TAO/orbsvcs/tests/InterfaceRepo/Application_Test/run_test.pl index 211c18bcdc4..d2964e91c2e 100755 --- a/TAO/orbsvcs/tests/InterfaceRepo/Application_Test/run_test.pl +++ b/TAO/orbsvcs/tests/InterfaceRepo/Application_Test/run_test.pl @@ -13,12 +13,21 @@ $status = 0; $ifr_iorfile= "if_repo.ior"; $svr_iorfile = "iorfile"; $test_idl = PerlACE::LocalFile ("test.idl"); - + +# find the tao_ifr executable. +# Its placement is dependent upon the OS and if MPC generated makefiles are used. +my $exec_extn=""; if ($^O eq "MSWin32") { - $tao_ifr = "../../../../../bin/tao_ifr"; + $exec_extn=".exe"; } -else { + +$tao_ifr = "../../../../../bin/tao_ifr"; +if (! -e $tao_ifr . $exec_extn ) { $tao_ifr = "../../../IFR_Service/tao_ifr"; + if (! -e $tao_ifr . $exec_extn ) { + print STDERR "ERROR: tao_ifr compiler not found.\n"; + exit 1; + } } $lookup_by_name = ""; @@ -34,7 +43,7 @@ for ($i = 0; $i <= $#ARGV; $i++) { } $TAO_IFR = new PerlACE::Process ($tao_ifr); -$IFR = new PerlACE::Process ("../../../IFR_Service/IFR_Service"); +$IFR = new PerlACE::Process ("../../../IFR_Service/IFR_Service", " -o $ifr_iorfile"); $SV = new PerlACE::Process ("server", "-ORBInitRef InterfaceRepository=file://$ifr_iorfile"); $CL = new PerlACE::Process ("client", "-ORBInitRef InterfaceRepository=file://$ifr_iorfile" . " $lookup_by_name"); diff --git a/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/run_test.pl b/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/run_test.pl index 83ddb17b104..1927767c2c6 100755 --- a/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/run_test.pl +++ b/TAO/orbsvcs/tests/InterfaceRepo/IDL3_Test/run_test.pl @@ -13,11 +13,20 @@ $status = 0; $ifr_iorfile= "if_repo.ior"; $test_idl = PerlACE::LocalFile ("test.idl"); +# find the tao_ifr executable. +# Its placement is dependent upon the OS and if MPC generated makefiles are used. +my $exec_extn=""; if ($^O eq "MSWin32") { - $tao_ifr = "../../../../../bin/tao_ifr"; + $exec_extn=".exe"; } -else { + +$tao_ifr = "../../../../../bin/tao_ifr"; +if (! -e $tao_ifr . $exec_extn ) { $tao_ifr = "../../../IFR_Service/tao_ifr"; + if (! -e $tao_ifr . $exec_extn ) { + print STDERR "ERROR: tao_ifr compiler not found.\n"; + exit 1; + } } for ($i = 0; $i <= $#ARGV; $i++) { @@ -30,7 +39,7 @@ for ($i = 0; $i <= $#ARGV; $i++) { } $TAO_IFR = new PerlACE::Process ($tao_ifr); -$IFR = new PerlACE::Process ("../../../IFR_Service/IFR_Service"); +$IFR = new PerlACE::Process ("../../../IFR_Service/IFR_Service", " -o $ifr_iorfile"); $CL = new PerlACE::Process ("IDL3_Test", "-ORBInitRef InterfaceRepository=file://$ifr_iorfile" . " $debug"); diff --git a/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/README b/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/README index 25164903ca2..45898fd7299 100644 --- a/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/README +++ b/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/README @@ -37,7 +37,7 @@ start the Interface Repository by typing in one window, then (in another window) - IFR_Test + IFR_Test -ORBInitRef InterfaceRepository=file://if_repo.ior (Unix) in this directory, type @@ -46,22 +46,18 @@ in this directory, type then - ./IFR_Test - + ./IFR_Test -ORBInitRef InterfaceRepository=file://if_repo.ior -If for some reason IP multicast is not available or enabled on your platform, -then add - -ORBInitRef InterfaceRepository=file://if_repo.ior +You may use IP multicast discovery by starting the server with "-m 1" +and use the default multicast address for the InterfaceRepository. -to the client's command line. If the IFR_Service has been started with the -command line option -o <filename> (see the README file in the IFR_Service -directory), then instead add + ../../../IFR_Service/IFR_Service -m 1 - -ORBInitRef InterfaceRepository=file://<filename> +and -to the client's command line. + ./IFR_Test You may add any of the options below to the IFR_Test command line. Both the Perl script and the test executable have the same command line options. diff --git a/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/run_test.pl b/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/run_test.pl index 039694e468d..da00f9c959a 100755 --- a/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/run_test.pl +++ b/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/run_test.pl @@ -39,7 +39,7 @@ for ($i = 0; $i <= $#ARGV; $i++) { unlink $iorfile; -$SV = new PerlACE::Process ("../../../IFR_Service/IFR_Service", " $nice " . " $locking"); +$SV = new PerlACE::Process ("../../../IFR_Service/IFR_Service", " $nice " . " -o $iorfile" . " $locking"); $CL = new PerlACE::Process ("IFR_Test", "-ORBInitRef InterfaceRepository=file://$iorfile" . " $debug $test $iterations"); diff --git a/TAO/orbsvcs/tests/InterfaceRepo/Latency_Test/run_test.pl b/TAO/orbsvcs/tests/InterfaceRepo/Latency_Test/run_test.pl index ff69afd4809..261b8ef4500 100755 --- a/TAO/orbsvcs/tests/InterfaceRepo/Latency_Test/run_test.pl +++ b/TAO/orbsvcs/tests/InterfaceRepo/Latency_Test/run_test.pl @@ -36,7 +36,7 @@ for ($i = 0; $i <= $#ARGV; $i++) { unlink $iorfile; -$SV = new PerlACE::Process ("../../../IFR_Service/IFR_Service", " $nice"); +$SV = new PerlACE::Process ("../../../IFR_Service/IFR_Service", " $nice" . " -o $iorfile"); $CL = new PerlACE::Process ("client", "-ORBInitRef InterfaceRepository=file://$iorfile" . " $debug $history $iterations"); diff --git a/TAO/orbsvcs/tests/InterfaceRepo/Persistence_Test/README b/TAO/orbsvcs/tests/InterfaceRepo/Persistence_Test/README index d14a610ca40..7eae42fd67c 100644 --- a/TAO/orbsvcs/tests/InterfaceRepo/Persistence_Test/README +++ b/TAO/orbsvcs/tests/InterfaceRepo/Persistence_Test/README @@ -16,11 +16,11 @@ It is far easier to run the test with the provided Perl script run_test.pl, but to do it by hand, first start the IFR with (Windows users remember to use backslashes instead): -../../../IFR_Service/IFR_Service -p +../../../IFR_Service/IFR_Service -p -m 1 Then execute the test code with -Persistence_Test +Persistence_Test This will populate the IFR with a few IFR objects. After the test finishes, stop the IFR. Then start it again diff --git a/TAO/orbsvcs/tests/InterfaceRepo/Persistence_Test/run_test.pl b/TAO/orbsvcs/tests/InterfaceRepo/Persistence_Test/run_test.pl index f6f3fd38b8f..3c934939688 100755 --- a/TAO/orbsvcs/tests/InterfaceRepo/Persistence_Test/run_test.pl +++ b/TAO/orbsvcs/tests/InterfaceRepo/Persistence_Test/run_test.pl @@ -35,7 +35,7 @@ unlink $backing_file; print STDERR "\t IFR Persistence Test\n\n"; -$IFR = new PerlACE::Process ("../../../IFR_Service/IFR_Service", $persistent); +$IFR = new PerlACE::Process ("../../../IFR_Service/IFR_Service", " -o $iorfile" . " $persistent"); $T = new PerlACE::Process ("Persistence_Test"); $IFR->Spawn (); |