diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-12-18 23:15:21 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-12-18 23:15:21 +0000 |
commit | 4f12c054417a4a4c8dea0e8216c82e7ed9aaf391 (patch) | |
tree | 3725998b51630e6ba5044e9228f98803d30ad4b4 | |
parent | eab4150a9f3bd3f2d61d242a60f3705f42633cfc (diff) | |
download | ATCD-4f12c054417a4a4c8dea0e8216c82e7ed9aaf391.tar.gz |
ChangeLogTag: Sat Dec 18 17:01:11 1999 Darrell Brunsch <brunsch@cs.wustl.edu>
-rw-r--r-- | TAO/ChangeLog-99c | 13 | ||||
-rw-r--r-- | TAO/orbsvcs/Time_Service/Server_i.cpp | 96 | ||||
-rw-r--r-- | TAO/orbsvcs/Time_Service/Server_i.h | 11 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Time/TAO_Time_Service_Server.cpp | 3 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Time/TAO_Time_Service_Server.h | 5 | ||||
-rwxr-xr-x | TAO/orbsvcs/tests/Time/run_test.pl | 86 |
6 files changed, 25 insertions, 189 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index 51decdca2e1..57b0468d263 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,3 +1,16 @@ +Sat Dec 18 17:01:11 1999 Darrell Brunsch <brunsch@cs.wustl.edu> + + * orbsvcs/Time_Service/Server_i.cpp: + * orbsvcs/Time_Service/Server_i.h: + * orbsvcs/orbsvcs/Time/TAO_Time_Service_Server.cpp: + * orbsvcs/orbsvcs/Time/TAO_Time_Service_Server.h: + * orbsvcs/tests/Time/run_test.pl: + + Removed the old IR_Helper code from the Time Service. Also + removed the use_ir test from the run_test.pl until I can + figure out the interactions between the time service + executables, the naming service, and the IMR. + Sat Dec 18 13:54:16 1999 David L. Levine <levine@cs.wustl.edu> * orbsvcs/orbsvcs/Notify/Notify_Dispatcher.h: made diff --git a/TAO/orbsvcs/Time_Service/Server_i.cpp b/TAO/orbsvcs/Time_Service/Server_i.cpp index 581a6f0b48c..8e0f3997024 100644 --- a/TAO/orbsvcs/Time_Service/Server_i.cpp +++ b/TAO/orbsvcs/Time_Service/Server_i.cpp @@ -7,8 +7,7 @@ ACE_RCSID(Time_Service, Server_i, "$Id$") // Constructor. Server_i::Server_i (void) - : ior_output_file_ (0), - use_ir_ (0) + : ior_output_file_ (0) { // no-op. } @@ -25,7 +24,7 @@ Server_i::~Server_i (void) int Server_i::parse_args (void) { - ACE_Get_Opt get_opts (this->argc_, this->argv_, "do:i"); + ACE_Get_Opt get_opts (this->argc_, this->argv_, "do:"); int c; while ((c = get_opts ()) != -1) @@ -43,9 +42,6 @@ Server_i::parse_args (void) "[SERVER] Process/Thread Id : (%P/%t)Unable to open %s for writing: %p\n", get_opts.optarg), -1); break; - case 'i': // Use the Implementation Repository. - this->use_ir_ = 1; - break; case '?': // display help for use of the server. default: ACE_ERROR_RETURN ((LM_ERROR, @@ -53,7 +49,6 @@ Server_i::parse_args (void) "usage: %s" " [-d]" " [-o] <ior_output_file>" - " [-i] <Use the Implementation Repository>" "\n", argv_ [0]), 1); @@ -103,60 +98,6 @@ Server_i::init_naming_service (CORBA::Environment &ACE_TRY_ENV) return 0; } -// Initialize the Implementation Repository. - -int -Server_i::init_IR (void) -{ - ACE_DECLARE_NEW_CORBA_ENV; - ACE_TRY - { - if (this->use_ir_ == 1) - { - ACE_NEW_RETURN (this->ir_helper_, - IR_Helper ("time_server", - this->orb_manager_.child_poa (), - this->orb_manager_.orb (), - TAO_debug_level), - -1); - - this->ir_helper_->change_object (this->time_service_server_.in (), - ACE_TRY_ENV); - } - - ACE_TRY_CHECK; - - // Convert the IR server reference to a string. - CORBA::String_var objref_server = - this->orb_manager_.orb ()->object_to_string (this->time_service_server_.in (), - ACE_TRY_ENV); - - ACE_TRY_CHECK; - - // Print the IR server IOR on the console. - ACE_DEBUG ((LM_DEBUG, - "[SERVER] Process/Thread : (%P/%t) The Time Service IREPO SERVER IOR is: <%s>\n", - objref_server.in ())); - - if (this->ior_output_file_) - { - // Write the IOR to the file. - ACE_OS::fprintf (this->ior_output_file_, - "%s\n", - objref_server.in ()); - ACE_OS::fclose (this->ior_output_file_); - } - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception:"); - return -1; - } - ACE_ENDTRY; - - return 0; -} - // Create a new time server object and register it with the child POA. // Print the IOR of the registered server on the console and in a file. @@ -169,7 +110,7 @@ Server_i::create_server (void) // Create a new server object. ACE_NEW_RETURN (this->time_service_server_impl_, - TAO_Time_Service_Server(this->use_ir_), + TAO_Time_Service_Server, 0); // Register a servant with the child poa. @@ -204,14 +145,12 @@ Server_i::create_server (void) // Print the server IOR on the console. ACE_DEBUG ((LM_DEBUG, "[SERVER] Process/Thread Id : (%P/%t) The Time Service " - "SERVER IOR without Implementation Repository is: <%s>\n", + "SERVER IOR: <%s>\n", objref_server.in ())); - // Print the IOR to a file if we are not using the Implementation Repository. - // If we are using the implementation repository then the 'changed IOR' is - // written to a file inside the init_IR (). + // Print the IOR to a file. - if ((this->ior_output_file_) && (this->use_ir_ == 0)) + if (this->ior_output_file_) { // Write the IOR to the file. ACE_OS::fprintf (this->ior_output_file_, @@ -361,21 +300,15 @@ Server_i::init (int argc, this->orb_ = this->orb_manager_.orb (); // Use the Naming Service Register the above implementation with the Naming Service. - if (this->use_ir_ == 0) - this->init_naming_service (ACE_TRY_ENV); + this->init_naming_service (ACE_TRY_ENV); ACE_TRY_CHECK; // Create the server object. this->create_server (); - // Initialize the IR. - if (this->use_ir_ == 1) - this->init_IR (); - // Register the server object with the Naming Service. - if (this->use_ir_ == 0) - this->register_server (); + this->register_server (); } ACE_CATCHANY @@ -396,23 +329,10 @@ Server_i::run (CORBA::Environment &ACE_TRY_ENV) { ACE_TRY { - - if (this->use_ir_ == 1) - { - this->ir_helper_->notify_startup (ACE_TRY_ENV); - ACE_TRY_CHECK; - } - if (this->orb_manager_.run (ACE_TRY_ENV) == -1) ACE_ERROR_RETURN ((LM_ERROR, "[SERVER] Process/Thread Id : (%P/%t) Server_i::run"), -1); - - if (this->use_ir_ == 1) - { - this->ir_helper_->notify_shutdown (ACE_TRY_ENV); - ACE_TRY_CHECK; - } } ACE_CATCHANY { diff --git a/TAO/orbsvcs/Time_Service/Server_i.h b/TAO/orbsvcs/Time_Service/Server_i.h index aea7f41ce4c..0585c13e314 100644 --- a/TAO/orbsvcs/Time_Service/Server_i.h +++ b/TAO/orbsvcs/Time_Service/Server_i.h @@ -23,7 +23,6 @@ #include "orbsvcs/CosNamingC.h" #include "orbsvcs/Naming/Naming_Utils.h" #include "orbsvcs/Time/TAO_Time_Service_Server.h" -#include "orbsvcs/IR_Helper.h" class Server_i { @@ -65,10 +64,6 @@ public: // Check if this is the first server binding to the Naming // Service. - int init_IR (void); - // Initialize the Implementation Repository and register the - // server with it. - private: CORBA::ORB_var orb_; @@ -93,12 +88,6 @@ private: CosNaming::NamingContext_var time_service_server_context_; // Naming context for the Naming Service. - IR_Helper *ir_helper_; - // The Implementation Repository Helper. - - int use_ir_; - // Use the Implementation Repository. - int argc_; // Number of command line arguments. diff --git a/TAO/orbsvcs/orbsvcs/Time/TAO_Time_Service_Server.cpp b/TAO/orbsvcs/orbsvcs/Time/TAO_Time_Service_Server.cpp index b7acb17250a..7246904d24a 100644 --- a/TAO/orbsvcs/orbsvcs/Time/TAO_Time_Service_Server.cpp +++ b/TAO/orbsvcs/orbsvcs/Time/TAO_Time_Service_Server.cpp @@ -6,8 +6,7 @@ #include "TAO_Time_Service_Server.h" // Constructor. -TAO_Time_Service_Server::TAO_Time_Service_Server (int shutdown) - : shutdown_ (shutdown) +TAO_Time_Service_Server::TAO_Time_Service_Server (void) { } diff --git a/TAO/orbsvcs/orbsvcs/Time/TAO_Time_Service_Server.h b/TAO/orbsvcs/orbsvcs/Time/TAO_Time_Service_Server.h index 6abb37123fb..6e43107959a 100644 --- a/TAO/orbsvcs/orbsvcs/Time/TAO_Time_Service_Server.h +++ b/TAO/orbsvcs/orbsvcs/Time/TAO_Time_Service_Server.h @@ -37,7 +37,7 @@ class TAO_ORBSVCS_Export TAO_Time_Service_Server : public POA_CosTime::TimeServi public: // = Initialization and termination methods. - TAO_Time_Service_Server (int shutdown); + TAO_Time_Service_Server (void); // Constructor. ~TAO_Time_Service_Server (void); @@ -74,9 +74,6 @@ public: ACE_THROW_SPEC ((CORBA::SystemException)); // This creates a new TIO with the given parameters. - int shutdown_; - // Used if the server is used with IR. If set the orb is shutdown after - // every method invocation. }; #endif /* TAO_TIME_SERVICE_SERVER_H */ diff --git a/TAO/orbsvcs/tests/Time/run_test.pl b/TAO/orbsvcs/tests/Time/run_test.pl index 5051c609ce4..f3164e9c2d0 100755 --- a/TAO/orbsvcs/tests/Time/run_test.pl +++ b/TAO/orbsvcs/tests/Time/run_test.pl @@ -18,10 +18,7 @@ $status = 0; unlink $server_ior; unlink $clerk_ior; -unlink $implrepo_ior; -$implrepo_program = "..$DIR_SEPARATOR..$DIR_SEPARATOR"."ImplRepo_Service".$DIR_SEPARATOR."ImplRepo_Service".$EXE_EXT; -$tao_ir_program = "..$DIR_SEPARATOR..$DIR_SEPARATOR"."ImplRepo_Service".$DIR_SEPARATOR."tao_ir".$EXE_EXT; $server_program = "..$DIR_SEPARATOR..$DIR_SEPARATOR"."Time_Service".$DIR_SEPARATOR."Time_Service_Server".$EXE_EXT; $clerk_program = "..$DIR_SEPARATOR..$DIR_SEPARATOR"."Time_Service".$DIR_SEPARATOR."Time_Service_Clerk".$EXE_EXT; $client_program = $EXEPREFIX."client".$EXE_EXT; @@ -60,7 +57,7 @@ sub time_service_test_using_files $SV1 = Process::Create ($server_program, "-o $server_ior"); - if (ACE::waitforfile_timed ($server_ior, 5) == -1) { + if (ACE::waitforfile_timed ($server_ior, 15) == -1) { print STDERR "ERROR: timedout waiting for file <$server_ior>\n"; $status = 1; $SV1->Kill (); $SV1->TimedWait (1); @@ -72,7 +69,7 @@ sub time_service_test_using_files $SV2 = Process::Create ($clerk_program, "-f $server_ior -o $clerk_ior -t 2"); - if (ACE::waitforfile_timed ($clerk_ior, 5) == -1) { + if (ACE::waitforfile_timed ($clerk_ior, 15) == -1) { print STDERR "ERROR: timedout waiting for file <$clerk_ior>\n"; $status = 1; $SV2->Kill (); $SV2->TimedWait (1); @@ -104,78 +101,6 @@ sub time_service_test_using_files unlink $server_ior; } -sub time_service_test_using_ir -{ - $IR = Process::Create ($implrepo_program, - "-o $implrepo_ior -d 1"); - - if (ACE::waitforfile_timed ($implrepo_ior, 5) == -1) { - print STDERR "ERROR: timedout waiting for file <$implrepo_ior>\n"; - $IR->Kill (); $IR->TimedWait (1); - exit 1; - } - - $TIR = Process::Create ($tao_ir_program, - "-ORBInitRef ImplRepoService=file://$implrepo_ior add ". - "time_server -c \"$server_program ". - "-ORBInitRef ImplRepoService=file://$implrepo_ior -i\""); - - sleep 5; - - $SV1 = Process::Create ($server_program, - "-ORBInitRef ImplRepoService=file://$implrepo_ior -o $server_ior -i"); - - if (ACE::waitforfile_timed ($server_ior, 5) == -1) { - print STDERR "ERROR: timedout waiting for file <$implerepo_ior>\n"; - $IR->Kill (); $IR->TimedWait (1); - $SV1->Kill (); $SV1->TimedWait (1); - exit 1; - } - - sleep 10; - - $SV2 = Process::Create ($clerk_program, - "-f $server_ior -o $clerk_ior"); - - sleep 10; - - $CL = Process::Create ($client_program, "-f $clerk_ior"); - - if ($CL->TimedWait (60) == -1) { - print STDERR "ERROR: client timedout\n"; - $status = 1; - $CL->Kill (); $CL->TimedWait (1); - } - - $IR->Terminate (); - if ($IR->TimedWait (5) == -1) { - print STDERR "ERROR: couldn't shutdown repository nicely\n"; - $status = 1; - $IR->Kill (); $IR->TimedWait (1); - } - - $TIR->Terminate (); - if ($TIR->TimedWait (5) == -1) { - print STDERR "ERROR: couldn't shutdown tao_ir nicely\n"; - $status = 1; - $TIR->Kill (); $TIR->TimedWait (1); - } - - $SV1->Terminate (); - $SV2->Terminate (); - if ($SV1->TimedWait (5) == -1 || - $SV2->TimedWait (5) == -1) { - print STDERR "ERROR: couldn't shutdown the servers nicely\n"; - $status = 1; - $SV1->Kill (); $SV2->Kill (); - $SV1->TimedWait (1); $SV2->TimedWait (1); - } - - unlink $clerk_ior; - unlink $server_ior; - unlink $implrepo_ior; -} - # Parse the arguments for ($i = 0; $i <= $#ARGV; $i++) @@ -188,7 +113,6 @@ for ($i = 0; $i <= $#ARGV; $i++) print "\n"; print "use_naming -- Runs the test using Naming Service\n"; print "use_files -- Runs the test using IOR Files\n"; - print "use_ir -- Runs the test with the IR\n"; exit; } @@ -204,12 +128,6 @@ for ($i = 0; $i <= $#ARGV; $i++) last SWITCH; } - if ($ARGV[$i] eq "use_ir") - { - time_service_test_using_ir (); - last SWITCH; - } - print "run_test: Unknown Option: ".$ARGV[$i]."\n"; } } |