diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:11 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:11 +0000 |
commit | 8008dd09ccf88d4edef237a184a698cac42f2952 (patch) | |
tree | da50d054f9c761c3f6a5923f6979e93306c56d68 /TAO/tests/DSI_Gateway | |
parent | 13d6e89af439164c0ade48e6f5c3e9b3f971e8c9 (diff) | |
download | ATCD-8008dd09ccf88d4edef237a184a698cac42f2952.tar.gz |
Repo restructuring
Diffstat (limited to 'TAO/tests/DSI_Gateway')
-rw-r--r-- | TAO/tests/DSI_Gateway/.cvsignore | 3 | ||||
-rw-r--r-- | TAO/tests/DSI_Gateway/DSI_Gateway.mpc | 25 | ||||
-rw-r--r-- | TAO/tests/DSI_Gateway/README | 36 | ||||
-rw-r--r-- | TAO/tests/DSI_Gateway/client.cpp | 183 | ||||
-rw-r--r-- | TAO/tests/DSI_Gateway/gateway.cpp | 146 | ||||
-rwxr-xr-x | TAO/tests/DSI_Gateway/run_exception_test.pl | 73 | ||||
-rwxr-xr-x | TAO/tests/DSI_Gateway/run_test.pl | 69 | ||||
-rw-r--r-- | TAO/tests/DSI_Gateway/server.cpp | 122 | ||||
-rw-r--r-- | TAO/tests/DSI_Gateway/test.idl | 32 | ||||
-rw-r--r-- | TAO/tests/DSI_Gateway/test_dsi.cpp | 85 | ||||
-rw-r--r-- | TAO/tests/DSI_Gateway/test_dsi.h | 69 | ||||
-rw-r--r-- | TAO/tests/DSI_Gateway/test_dsi.i | 11 | ||||
-rw-r--r-- | TAO/tests/DSI_Gateway/test_i.cpp | 63 | ||||
-rw-r--r-- | TAO/tests/DSI_Gateway/test_i.h | 60 | ||||
-rw-r--r-- | TAO/tests/DSI_Gateway/test_i.i | 7 |
15 files changed, 0 insertions, 984 deletions
diff --git a/TAO/tests/DSI_Gateway/.cvsignore b/TAO/tests/DSI_Gateway/.cvsignore deleted file mode 100644 index 173dd5296f5..00000000000 --- a/TAO/tests/DSI_Gateway/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -client -gateway -server diff --git a/TAO/tests/DSI_Gateway/DSI_Gateway.mpc b/TAO/tests/DSI_Gateway/DSI_Gateway.mpc deleted file mode 100644 index c5deacad25b..00000000000 --- a/TAO/tests/DSI_Gateway/DSI_Gateway.mpc +++ /dev/null @@ -1,25 +0,0 @@ -// -*- MPC -*- -// $Id$ - -project(*Server): taoserver, messaging, minimum_corba, dynamicinterface { - Source_Files { - test_i.cpp - server.cpp - } -} - -project(*Client): taoclient, messaging, minimum_corba, dynamicinterface { - after += *Server - Source_Files { - testC.cpp - client.cpp - } -} - -project(*Gateway): taoexe, portableserver, messaging, minimum_corba, dynamicinterface { - after += *Client - Source_Files { - test_dsi.cpp - gateway.cpp - } -} diff --git a/TAO/tests/DSI_Gateway/README b/TAO/tests/DSI_Gateway/README deleted file mode 100644 index aad5b8f69e1..00000000000 --- a/TAO/tests/DSI_Gateway/README +++ /dev/null @@ -1,36 +0,0 @@ -# $Id$ - - A simple test for the DSI/DII gateway support. TAO can -optimize some demarshaling/marshaling and data copying in the -implementation of DSI/DII based gateways. The DSI/DII gateway can -also pass requests and replies that are not in native (the -gateway's) byte order. NOTE - For this last feature to work, you -must compile ACE with ACE_ENABLE_SWAP_ON_WRITE defined. - - This is a smoke test and simple example for those -features. Use - - $ server -o server.ior - $ gateway -k file://server.ior -o gw.ior - $ client -k file://gw.ior -i 100 -x - -or run the run_test.pl script. - - A second perl script, run_exception_test.pl, -tests the exception handling of the gateway. The script -runs the client twice, first calling a method that raises -a user exception (containing several fields of information), -then calling a method that raises a CORBA system exception. - - To run these tests by hand, start the server and gateway -as shown above, then use - - $ client -k file://gw.ior -u - -for the user exception test and - - $ client -k file://gw.ior -s - -for the system exception test. For these tests, the -x -option (server shutdown) and -i option (# of calls) -are inoperative.
\ No newline at end of file diff --git a/TAO/tests/DSI_Gateway/client.cpp b/TAO/tests/DSI_Gateway/client.cpp deleted file mode 100644 index 4919809f944..00000000000 --- a/TAO/tests/DSI_Gateway/client.cpp +++ /dev/null @@ -1,183 +0,0 @@ -// $Id$ - -#include "testC.h" -#include "tao/debug.h" -#include "ace/Get_Opt.h" -#include "ace/Task.h" - -ACE_RCSID(DSI_Gateway, client, "$Id$") - -const char *ior = "file://gateway.ior"; -int niterations = 5; -int do_shutdown = 0; -int test_user_exception = 0; -int test_system_exception = 0; - -int -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, "xusk:i:"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'x': - do_shutdown = 1; - break; - - case 'u': - test_user_exception = 1; - break; - - case 's': - test_system_exception = 1; - break; - - case 'k': - ior = get_opts.opt_arg (); - break; - - case 'i': - niterations = ACE_OS::atoi (get_opts.opt_arg ()); - break; - - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s " - "-x " - "-u " - "-s " - "-k <ior> " - "-i <niterations> " - "\n", - argv [0]), - -1); - } - - // Indicates sucessful parsing of the command line - return 0; -} - -int -main (int argc, char *argv[]) -{ - ACE_TRY_NEW_ENV - { - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (parse_args (argc, argv) != 0) - { - return 1; - } - - CORBA::Object_var object = - orb->string_to_object (ior ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - Simple_Server_var server = - Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (CORBA::is_nil (server.in ())) - { - ACE_ERROR_RETURN ((LM_ERROR, - "Object reference <%s> is nil\n", - ior), - 1); - } - - Structure the_in_structure; - the_in_structure.seq.length (10); - - if (test_user_exception == 1) - { - server->raise_user_exception (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - else if (test_system_exception == 1) - { - server->raise_system_exception (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - else - { - for (int i = 0; i != niterations; ++i) - { - the_in_structure.i = i; - CORBA::String_var name = CORBA::string_dup ("the name"); - - Structure_var the_out_structure; - - CORBA::Long r = - server->test_method (i, - the_in_structure, - the_out_structure.out (), - name.inout () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (TAO_debug_level > 0) - { - ACE_DEBUG ((LM_DEBUG, - "DSI_Simpler_Server ====\n" - " x = %d\n" - " i = %d\n" - " length = %d\n" - " name = <%s>\n", - r, - the_out_structure->i, - the_out_structure->seq.length (), - name.in ())); - } - - if (r != i) - { - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) unexpected result = %d for %d", - r, i)); - } - } - } - - if (do_shutdown) - { - server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - } - ACE_CATCH (test_exception, ex) - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Client: exception caught - "); - - ACE_DEBUG ((LM_DEBUG, - "error code: %d\n" - "error info: %s\n" - "status: %s\n", - ex.error_code, - ex.error_message.in (), - ex.status_message.in ())); - - return 0; - } - ACE_CATCH (CORBA::NO_PERMISSION, ex) - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Client: exception caught - "); - - return 0; - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Client: exception caught - "); - return 1; - } - ACE_ENDTRY; - - return 0; -} diff --git a/TAO/tests/DSI_Gateway/gateway.cpp b/TAO/tests/DSI_Gateway/gateway.cpp deleted file mode 100644 index 4aade2c1f03..00000000000 --- a/TAO/tests/DSI_Gateway/gateway.cpp +++ /dev/null @@ -1,146 +0,0 @@ -// $Id$ - -#include "test_dsi.h" -#include "ace/Get_Opt.h" -#include "ace/Task.h" - -ACE_RCSID(DSI_Gateway, server, "$Id$") - -const char *ior = "file://test.ior"; -int niterations = 5; -int do_shutdown = 0; -const char *ior_output_file = "gateway.ior"; - -int -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, "xk:i:o:"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'x': - do_shutdown = 1; - break; - - case 'k': - ior = get_opts.opt_arg (); - break; - - case 'i': - niterations = ACE_OS::atoi (get_opts.opt_arg ()); - break; - - case 'o': - ior_output_file = get_opts.opt_arg (); - break; - - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s " - "-x " - "-k <ior> " - "-i <niterations> " - "-o <iorfile> " - "\n", - argv [0]), - -1); - } - - // Indicates sucessful parsing of the command line - return 0; -} - -int -main (int argc, char *argv[]) -{ - ACE_TRY_NEW_ENV - { - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER); - 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_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (parse_args (argc, argv) != 0) - { - return 1; - } - - CORBA::Object_var object = - orb->string_to_object (ior ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - DSI_Simple_Server server_impl (orb.in (), - object.in (), - root_poa.in ()); - PortableServer::ObjectId_var oid = - root_poa->activate_object (&server_impl - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - CORBA::Object_var server = - root_poa->id_to_reference (oid.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - CORBA::String_var ior = - orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ())); - - // If the ior_output_file exists, output the ior to it - if (ior_output_file != 0) - { - FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); - - if (output_file == 0) - { - ACE_ERROR_RETURN ((LM_ERROR, - "Cannot open output file for writing IOR: %s", - ior_output_file), - 1); - } - - ACE_OS::fprintf (output_file, "%s", ior.in ()); - ACE_OS::fclose (output_file); - } - - orb->run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Gateway: exception caught - "); - return 1; - } - ACE_ENDTRY; - - return 0; -} diff --git a/TAO/tests/DSI_Gateway/run_exception_test.pl b/TAO/tests/DSI_Gateway/run_exception_test.pl deleted file mode 100755 index 7ebeb4048f2..00000000000 --- a/TAO/tests/DSI_Gateway/run_exception_test.pl +++ /dev/null @@ -1,73 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -# $Id$ -# -*- perl -*- - -use lib '../../../bin'; -use PerlACE::Run_Test; - -$svfile = PerlACE::LocalFile ("server.ior"); -$gwfile = PerlACE::LocalFile ("gateway.ior"); - -unlink $svfile; -unlink $gwfile; - -$status = 0; - -$SV = new PerlACE::Process ("server", "-o $svfile"); -$GW = new PerlACE::Process ("gateway", "-k file://$svfile -o $gwfile"); -$CL = new PerlACE::Process ("client", "-k file://$gwfile -u"); - -$SV->Spawn (); - -if (PerlACE::waitforfile_timed ($svfile, 5) == -1) { - print STDERR "ERROR: cannot find file <$svfile>\n"; - $SV->Kill (); - exit 1; -} - -$GW->Spawn (); - -if (PerlACE::waitforfile_timed ($gwfile, 5) == -1) { - print STDERR "ERROR: cannot find file <$gwfile>\n"; - $SV->Kill (); - $GW->Kill (); - exit 1; -} - -$client = $CL->SpawnWaitKill (60); - -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; - $status = 1; -} - -$CL = new PerlACE::Process ("client", "-k file://$gwfile -s"); - -$client = $CL->SpawnWaitKill (60); - -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; - $status = 1; -} - -$server = $SV->Kill (); - -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; - $status = 1; -} - -$gateway = $GW->Kill (); - -if ($gateway != 0) { - print STDERR "ERROR: gateway returned $gateway\n"; - $status = 1; -} - -unlink $svfile; -unlink $gwfile; - -exit $status; diff --git a/TAO/tests/DSI_Gateway/run_test.pl b/TAO/tests/DSI_Gateway/run_test.pl deleted file mode 100755 index 46ca8588693..00000000000 --- a/TAO/tests/DSI_Gateway/run_test.pl +++ /dev/null @@ -1,69 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -# $Id$ -# -*- perl -*- - -use lib '../../../bin'; -use PerlACE::Run_Test; - -$svfile = PerlACE::LocalFile ("server.ior"); -$gwfile = PerlACE::LocalFile ("gateway.ior"); - -unlink $svfile; -unlink $gwfile; - -$status = 0; - -if (PerlACE::is_vxworks_test()) { - $SV = new PerlACE::ProcessVX ("server", "-o server.ior"); -} -else { - $SV = new PerlACE::Process ("server", "-o $svfile"); -} -$GW = new PerlACE::Process ("gateway", "-k file://$svfile -o $gwfile"); -$CL = new PerlACE::Process ("client", "-k file://$gwfile -x -i 100"); - -$SV->Spawn (); - -if (PerlACE::waitforfile_timed ($svfile, 10) == -1) { - print STDERR "ERROR: cannot find file <$svfile>\n"; - $SV->Kill (); - exit 1; -} - -$GW->Spawn (); - -if (PerlACE::waitforfile_timed ($gwfile, 10) == -1) { - print STDERR "ERROR: cannot find file <$gwfile>\n"; - $SV->Kill (); - $GW->Kill (); - exit 1; -} - -$client = $CL->SpawnWaitKill (60); - -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; - $status = 1; -} - -$server = $SV->WaitKill (5); - -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; - $status = 1; -} - -$gateway = $GW->WaitKill (5); - -if ($gateway != 0) { - print STDERR "ERROR: gateway returned $gateway\n"; - $status = 1; -} - -unlink $svfile; -unlink $gwfile; - -exit $status; diff --git a/TAO/tests/DSI_Gateway/server.cpp b/TAO/tests/DSI_Gateway/server.cpp deleted file mode 100644 index dfe1919fe78..00000000000 --- a/TAO/tests/DSI_Gateway/server.cpp +++ /dev/null @@ -1,122 +0,0 @@ -// $Id$ - -#include "test_i.h" -#include "ace/Get_Opt.h" -#include "ace/Task.h" - -ACE_RCSID(DSI_Gateway, server, "$Id$") - -const char *ior_output_file = "server.ior"; - -int nthreads = 4; - -int -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, "o:n:"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'o': - ior_output_file = get_opts.opt_arg (); - break; - - case 'n': - nthreads = ACE_OS::atoi (get_opts.opt_arg ()); - break; - - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s " - "-o <iorfile>" - "\n", - argv [0]), - -1); - } - // Indicates sucessful parsing of the command line - return 0; -} - -int -main (int argc, char *argv[]) -{ - ACE_TRY_NEW_ENV - { - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER); - 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_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (parse_args (argc, argv) != 0) - { - return 1; - } - - Simple_Server_i server_impl (orb.in ()); - - Simple_Server_var server = - server_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - CORBA::String_var ior = - orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ())); - - // If the ior_output_file exists, output the ior to it - if (ior_output_file != 0) - { - FILE *output_file= ACE_OS::fopen (ior_output_file, "w"); - - if (output_file == 0) - { - ACE_ERROR_RETURN ((LM_ERROR, - "Cannot open output file for writing IOR: %s", - ior_output_file), - 1); - } - - ACE_OS::fprintf (output_file, "%s", ior.in ()); - ACE_OS::fclose (output_file); - } - - poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - orb->run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - ACE_DEBUG ((LM_DEBUG, "event loop finished\n")); - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Server: exception caught - "); - return 1; - } - ACE_ENDTRY; - - return 0; -} diff --git a/TAO/tests/DSI_Gateway/test.idl b/TAO/tests/DSI_Gateway/test.idl deleted file mode 100644 index d35c073b70d..00000000000 --- a/TAO/tests/DSI_Gateway/test.idl +++ /dev/null @@ -1,32 +0,0 @@ -// -// $Id$ -// - -typedef sequence<long> DSI_LongSeq; - -struct Structure -{ - short i; - sequence<long> seq; -}; - -exception test_exception -{ - short error_code; - string error_message; - string status_message; -}; - -interface Simple_Server -{ - long test_method (in long x, - in Structure the_in_structure, - out Structure the_out_structure, - inout string name); - - void raise_user_exception () raises (test_exception); - - void raise_system_exception (); - - oneway void shutdown (); -}; diff --git a/TAO/tests/DSI_Gateway/test_dsi.cpp b/TAO/tests/DSI_Gateway/test_dsi.cpp deleted file mode 100644 index 4a7c7f2557e..00000000000 --- a/TAO/tests/DSI_Gateway/test_dsi.cpp +++ /dev/null @@ -1,85 +0,0 @@ -// $Id$ - -#include "test_dsi.h" -#include "tao/DynamicInterface/Request.h" -#include "tao/DynamicInterface/Unknown_User_Exception.h" - -#if !defined(__ACE_INLINE__) -#include "test_dsi.i" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID(DSI_Gateway, test_dsi, "$Id$") - -void -DSI_Simple_Server::invoke (CORBA::ServerRequest_ptr request - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - CORBA::NVList_ptr list; - this->orb_->create_list (0, list ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - request->arguments (list ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - CORBA::Request_var target_request; - - this->target_->_create_request (0, // ctx - request->operation (), - list, - 0, // result - 0, // exception_list, - 0, // context_list, - target_request.inout (), - 0 - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - - target_request->_tao_lazy_evaluation (1); - - // Outgoing request must have the same byte order as the incoming one. - target_request->_tao_byte_order (request->_tao_incoming_byte_order ()); - - ACE_TRY - { - // Updates the byte order state, if necessary. - target_request->invoke (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCH (CORBA::UNKNOWN, ex) - { - ACE_UNUSED_ARG (ex); - - // Outgoing reply must have the same byte order as the incoming one. - request->_tao_reply_byte_order (target_request->_tao_byte_order ()); - - request->gateway_exception_reply (target_request->raw_user_exception ()); - - return; - } - ACE_ENDTRY; - - // Outgoing reply must have the same byte order as the incoming one. - request->_tao_reply_byte_order (target_request->_tao_byte_order ()); - - if (ACE_OS::strcmp ("shutdown", request->operation ()) == 0) - { - this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER); - ACE_CHECK; - } -} - -CORBA::RepositoryId -DSI_Simple_Server::_primary_interface (const PortableServer::ObjectId &, - PortableServer::POA_ptr - ACE_ENV_ARG_DECL_NOT_USED) - ACE_THROW_SPEC (()) -{ - return CORBA::string_dup ("IDL:Simple_Server:1.0"); -} - -PortableServer::POA_ptr -DSI_Simple_Server::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) -{ - return PortableServer::POA::_duplicate (this->poa_.in ()); -} diff --git a/TAO/tests/DSI_Gateway/test_dsi.h b/TAO/tests/DSI_Gateway/test_dsi.h deleted file mode 100644 index 05a1f7abb61..00000000000 --- a/TAO/tests/DSI_Gateway/test_dsi.h +++ /dev/null @@ -1,69 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/tests/DSI_Gateway -// -// = FILENAME -// test_i.h -// -// = AUTHOR -// Carlos O'Ryan -// -// ============================================================================ - -#ifndef TAO_DSI_GATEWAY_TEST_DSI_H -#define TAO_DSI_GATEWAY_TEST_DSI_H - -#include "tao/DynamicInterface/Server_Request.h" -#include "tao/DynamicInterface/Dynamic_Implementation.h" -#include "tao/PortableServer/PortableServer.h" -#include "tao/ORB.h" - -class DSI_Simple_Server : public TAO_DynamicImplementation -{ - // = TITLE - // DSI Simpler Server implementation - // - // = DESCRIPTION - // Implements the DSI/DII gateway. - // -public: - DSI_Simple_Server (CORBA::ORB_ptr orb, - CORBA::Object_ptr target, - PortableServer::POA_ptr poa); - // ctor - - // = The DynamicImplementation methods. - virtual void invoke (CORBA::ServerRequest_ptr request - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - virtual CORBA::RepositoryId _primary_interface ( - const PortableServer::ObjectId &oid, - PortableServer::POA_ptr poa - ACE_ENV_ARG_DECL - ) - ACE_THROW_SPEC (()); - - virtual PortableServer::POA_ptr _default_POA ( - ACE_ENV_SINGLE_ARG_DECL - ); - -private: - CORBA::ORB_var orb_; - // The ORB - - CORBA::Object_var target_; - // Target object, forward requests to it... - - PortableServer::POA_var poa_; - // The POA -}; - -#if defined(__ACE_INLINE__) -#include "test_dsi.i" -#endif /* __ACE_INLINE__ */ - -#endif /* TAO_DSI_GATEWAY_TEST_I_H */ diff --git a/TAO/tests/DSI_Gateway/test_dsi.i b/TAO/tests/DSI_Gateway/test_dsi.i deleted file mode 100644 index dab987ec71e..00000000000 --- a/TAO/tests/DSI_Gateway/test_dsi.i +++ /dev/null @@ -1,11 +0,0 @@ -// $Id$ - -ACE_INLINE -DSI_Simple_Server::DSI_Simple_Server (CORBA::ORB_ptr orb, - CORBA::Object_ptr target,//Simple_Server_ptr target, - PortableServer::POA_ptr poa) - : orb_ (CORBA::ORB::_duplicate (orb)), - target_ (CORBA::Object::_duplicate (target)),//Simple_Server::_duplicate (target)), - poa_ (PortableServer::POA::_duplicate (poa)) -{ -} diff --git a/TAO/tests/DSI_Gateway/test_i.cpp b/TAO/tests/DSI_Gateway/test_i.cpp deleted file mode 100644 index c68a1d5c7f8..00000000000 --- a/TAO/tests/DSI_Gateway/test_i.cpp +++ /dev/null @@ -1,63 +0,0 @@ -// $Id$ - -#include "test_i.h" -#include "tao/debug.h" - -#if !defined(__ACE_INLINE__) -#include "test_i.i" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID(DSI_Gateway, test_i, "$Id$") - -CORBA::Long -Simple_Server_i::test_method (CORBA::Long x, - const Structure& the_in_structure, - Structure_out the_out_structure, - char *&name - ACE_ENV_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - Structure *tmp = 0; - ACE_NEW_RETURN (tmp, Structure (the_in_structure), -1); - the_out_structure = tmp; - - if (TAO_debug_level > 0) - { - ACE_DEBUG ((LM_DEBUG, - "Simpler_Server_i ====\n" - " x = %d\n" - " i = %d\n" - " length = %d\n" - " name = <%s>\n", - x, - the_in_structure.i, - the_in_structure.seq.length (), - name)); - } - - return x; -} - -void -Simple_Server_i::raise_user_exception (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - test_exception)) -{ - ACE_THROW (test_exception (33, - "reactor meltdown", - "kaput")); -} - -void -Simple_Server_i::raise_system_exception (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - ACE_THROW (CORBA::NO_PERMISSION ()); -} - -void -Simple_Server_i::shutdown (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER); -} diff --git a/TAO/tests/DSI_Gateway/test_i.h b/TAO/tests/DSI_Gateway/test_i.h deleted file mode 100644 index 13d0e484c55..00000000000 --- a/TAO/tests/DSI_Gateway/test_i.h +++ /dev/null @@ -1,60 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/tests/DSI_Gateway -// -// = FILENAME -// test_i.h -// -// = AUTHOR -// Carlos O'Ryan -// -// ============================================================================ - -#ifndef TAO_DSI_GATEWAY_TEST_I_H -#define TAO_DSI_GATEWAY_TEST_I_H - -#include "testS.h" - -class Simple_Server_i : public POA_Simple_Server -{ - // = TITLE - // Simpler Server implementation - // - // = DESCRIPTION - // Implements the Simple_Server interface in test.idl - // -public: - Simple_Server_i (CORBA::ORB_ptr orb); - // ctor - - // = The Simple_Server methods. - CORBA::Long test_method (CORBA::Long x, - const Structure& the_in_structure, - Structure_out the_out_structure, - char *&name - ACE_ENV_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - - void raise_user_exception (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException, - test_exception)); - - void raise_system_exception (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - - void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED) - ACE_THROW_SPEC ((CORBA::SystemException)); - -private: - CORBA::ORB_var orb_; - // The ORB -}; - -#if defined(__ACE_INLINE__) -#include "test_i.i" -#endif /* __ACE_INLINE__ */ - -#endif /* TAO_DSI_GATEWAY_TEST_I_H */ diff --git a/TAO/tests/DSI_Gateway/test_i.i b/TAO/tests/DSI_Gateway/test_i.i deleted file mode 100644 index 97524552ff4..00000000000 --- a/TAO/tests/DSI_Gateway/test_i.i +++ /dev/null @@ -1,7 +0,0 @@ -// $Id$ - -ACE_INLINE -Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb) - : orb_ (CORBA::ORB::_duplicate (orb)) -{ -} |