diff options
Diffstat (limited to 'TAO/tests/NestedUpcall/Reactor')
-rw-r--r-- | TAO/tests/NestedUpcall/Reactor/README | 22 | ||||
-rw-r--r-- | TAO/tests/NestedUpcall/Reactor/mt_client.cpp | 22 | ||||
-rwxr-xr-x | TAO/tests/NestedUpcall/Reactor/run_test.pl | 10 | ||||
-rw-r--r-- | TAO/tests/NestedUpcall/Reactor/svc.mt.conf | 6 |
4 files changed, 52 insertions, 8 deletions
diff --git a/TAO/tests/NestedUpcall/Reactor/README b/TAO/tests/NestedUpcall/Reactor/README index a1147be10e4..ad55350a1a3 100644 --- a/TAO/tests/NestedUpcall/Reactor/README +++ b/TAO/tests/NestedUpcall/Reactor/README @@ -36,13 +36,10 @@ client if you don't want to use the naming service. server: ------- -% server [-d] [-s] [-ORBhost <serverhost>] [-ORBport <portnum>] - [-o <ior_output_file>] +% server [-d] [-o <ior_output_file>] Options: ------- --s Tells the server not to use the Naming Service. - -d Debug flag (It is additive more -d flags will give debugging). -o Outputs the ior file to the file @@ -56,14 +53,12 @@ are ignored. client: ------- -% client [-d] [-s] [-x] <-f ior_file> <-k ior> -n <iterations> +% client [-d] [-x] <-f ior_file> <-k ior> -n <iterations> Options: ------- d Debug flag - s Don't Use the Naming Service x Tells the server to shutdown. - f Reads the ior from the file k Reads the ior from commandline There are 3 ways of giving the IOR to the client: @@ -76,6 +71,19 @@ Options: 3. Get it from the Naming Service (which is the default client behavior). +mt_client: +------- + +% mt_client [-d] [-x] <-k ior> [-n <iterations>] [-t threads] + +Options: +------- + d Debug flag + x Tells the server to shutdown. + k Reads the ior from commandline + n Number of iterations on each thread + t Number of concurrent threads + NestedUpCalls_Test: ------------------ diff --git a/TAO/tests/NestedUpcall/Reactor/mt_client.cpp b/TAO/tests/NestedUpcall/Reactor/mt_client.cpp index c9bbc16ac93..85dd43bc314 100644 --- a/TAO/tests/NestedUpcall/Reactor/mt_client.cpp +++ b/TAO/tests/NestedUpcall/Reactor/mt_client.cpp @@ -97,7 +97,7 @@ NestedUpCalls_MT_Client::svc (void) { ACE_TRY_NEW_ENV { - ACE_DEBUG ((LM_DEBUG, "Running thread (%t)\n")); + ACE_DEBUG ((LM_DEBUG, "Running thread (%t)\n")); // Create an EventHandler servant to hand to the other side... auto_ptr<EventHandler_i> eh_impl (new EventHandler_i); @@ -168,6 +168,26 @@ NestedUpCalls_MT_Client::init (int argc, char *argv[]) ACE_DEBUG ((LM_DEBUG, "Reactor received OK\n")); + + CORBA::Object_var poa_object = + this->orb_->resolve_initial_references("RootPOA", ACE_TRY_ENV); + ACE_TRY_CHECK; + + if (CORBA::is_nil (poa_object.in ())) + ACE_ERROR_RETURN ((LM_ERROR, + " (%P|%t) Unable to initialize the POA.\n"), + 1); + + PortableServer::POA_var root_poa = + PortableServer::POA::_narrow (poa_object.in (), ACE_TRY_ENV); + ACE_TRY_CHECK; + + PortableServer::POAManager_var poa_manager = + root_poa->the_POAManager (ACE_TRY_ENV); + ACE_TRY_CHECK; + + poa_manager->activate (ACE_TRY_ENV); + ACE_TRY_CHECK; } ACE_CATCHANY { diff --git a/TAO/tests/NestedUpcall/Reactor/run_test.pl b/TAO/tests/NestedUpcall/Reactor/run_test.pl index 05f15378052..c3ffe2f9b0b 100755 --- a/TAO/tests/NestedUpcall/Reactor/run_test.pl +++ b/TAO/tests/NestedUpcall/Reactor/run_test.pl @@ -20,5 +20,15 @@ $status = system ($EXEPREFIX."client".$Process::EXE_EXT. $SV->Wait (); +$SV = Process::Create ($EXEPREFIX."server".$Process::EXE_EXT, + "-o $file"); + +ACE::waitforfile ($file); + +$status = system ($EXEPREFIX."mt_client".$Process::EXE_EXT. + "-x -k file://$file -ORBsvcconf svc.mt.conf"); + +$SV->Wait (); + # @@ Capture any errors from the server too. exit $status; diff --git a/TAO/tests/NestedUpcall/Reactor/svc.mt.conf b/TAO/tests/NestedUpcall/Reactor/svc.mt.conf new file mode 100644 index 00000000000..ebb9810b5ca --- /dev/null +++ b/TAO/tests/NestedUpcall/Reactor/svc.mt.conf @@ -0,0 +1,6 @@ +# $Id$ +# +# Please see $TAO_ROOT/docs/Options.html for details on these options. +# + +static Client_Strategy_Factory "-ORBclientconnectionhandler MT" |