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 | 6b846cf03c0bcbd8c276cb0af61a181e5f98eaae (patch) | |
tree | da50d054f9c761c3f6a5923f6979e93306c56d68 /TAO/tests/GIOP_Fragments | |
parent | 0e555b9150d38e3b3473ba325b56db2642e6352b (diff) | |
download | ATCD-6b846cf03c0bcbd8c276cb0af61a181e5f98eaae.tar.gz |
Repo restructuring
Diffstat (limited to 'TAO/tests/GIOP_Fragments')
28 files changed, 0 insertions, 1472 deletions
diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Reply/Client_Task.cpp b/TAO/tests/GIOP_Fragments/Java_Big_Reply/Client_Task.cpp deleted file mode 100644 index a6a92dab129..00000000000 --- a/TAO/tests/GIOP_Fragments/Java_Big_Reply/Client_Task.cpp +++ /dev/null @@ -1,60 +0,0 @@ -// -// $Id$ -// - -#include "Client_Task.h" - -ACE_RCSID(Muxing, Client_Task, "$Id$") - -Client_Task::Client_Task (Test::Big_Reply_ptr reply_gen, - int event_count, - ACE_Thread_Manager *thr_mgr) - : ACE_Task_Base (thr_mgr) - , reply_gen_ (Test::Big_Reply::_duplicate (reply_gen)) - , event_count_ (event_count) - -{ -} - -int -Client_Task::svc (void) -{ - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting client task\n")); - - ACE_DECLARE_NEW_CORBA_ENV; - - // Now get the big replies.. - ACE_TRY - { - for (int i = 0; i != this->event_count_; ++i) - { - Test::Octet_Seq_var seq = - this->reply_gen_->get_big_reply (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - CORBA::ULong length = seq->length (); - for(CORBA::ULong i = 0; i < length; ++i) - { - if (seq[i] != 'A') - { - ACE_ERROR_RETURN ((LM_ERROR, - "Invalid data '%c' at %d\n", seq[i], i), - -1); - } - } - -// ACE_Time_Value tv(0, 10000000); -// ACE_OS::sleep(tv); - } - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception Caught \n"); - return -1; - } - ACE_ENDTRY; - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Client task finished\n")); - return 0; -} diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Reply/Client_Task.h b/TAO/tests/GIOP_Fragments/Java_Big_Reply/Client_Task.h deleted file mode 100644 index 7a3de11b440..00000000000 --- a/TAO/tests/GIOP_Fragments/Java_Big_Reply/Client_Task.h +++ /dev/null @@ -1,38 +0,0 @@ -// -// $Id$ -// - -#ifndef JAVA_BIG_REPLY_CLIENT_TASK_H -#define JAVA_BIG_REPLY_CLIENT_TASK_H -#include /**/ "ace/pre.h" - -#include "TestC.h" -#include "ace/Task.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -/// Implement a Task to run the experiments using multiple threads. -class Client_Task : public ACE_Task_Base -{ -public: - /// Constructor - Client_Task (Test::Big_Reply_ptr receiver, - CORBA::Long event_count, - ACE_Thread_Manager *thr_mgr); - - /// Thread entry point - int svc (void); - -private: - - /// Reference to the test interface - Test::Big_Reply_var reply_gen_; - - /// Number of remote calls - int event_count_; -}; - -#include /**/ "ace/post.h" -#endif /* JAVA_BIG_REPLY_CLIENT_TASK_H */ diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Reply/Java_Big_Reply.mpc b/TAO/tests/GIOP_Fragments/Java_Big_Reply/Java_Big_Reply.mpc deleted file mode 100644 index 693db9d11bc..00000000000 --- a/TAO/tests/GIOP_Fragments/Java_Big_Reply/Java_Big_Reply.mpc +++ /dev/null @@ -1,48 +0,0 @@ -// -*- MPC -*- -// $Id$ - -project(*IDL) { - requires += java - - // Define the Java IDL with a hack output extension - // Since our idl file has a module, the generated java files - // will go int the module name so we set the extension to / - Define_Custom(JAVA_IDL) { - command = idlj - inputext = .idl - generic_outputext = / - } - - // Make sure we don't get any of the defaults - Source_Files { - } - Inline_Files { - } - Header_Files { - } - - JAVA_IDL_Files { - // The idlj will automatically put the generated files - // in the Test directory - gendir = Test - - // We want both server and client side - commandflags += -fall - - Test.idl - } -} - -// This project will build the java server and C++ client -project(Java_Big_Reply): taoexe, portableserver { - requires += java - after += *IDL - - // Define the java type - Define_Custom(JAVA) { - command = javac - commandflags = -d . - inputext = .java - generic_outputext = .class - } -} diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Reply/Test.idl b/TAO/tests/GIOP_Fragments/Java_Big_Reply/Test.idl deleted file mode 100644 index 442d6a746be..00000000000 --- a/TAO/tests/GIOP_Fragments/Java_Big_Reply/Test.idl +++ /dev/null @@ -1,18 +0,0 @@ -//$Id$ -module Test -{ - - typedef sequence<octet> Octet_Seq; - - interface Big_Reply - { - /// Receive a big reply - Octet_Seq get_big_reply (); - - /// Ping message - void ping (); - - /// Shudown the remote ORB - oneway void shutdown (); - }; -}; diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Reply/client.cpp b/TAO/tests/GIOP_Fragments/Java_Big_Reply/client.cpp deleted file mode 100644 index e900b46cdc1..00000000000 --- a/TAO/tests/GIOP_Fragments/Java_Big_Reply/client.cpp +++ /dev/null @@ -1,95 +0,0 @@ -// $Id$ - -#include "Client_Task.h" -#include "ace/Get_Opt.h" - -ACE_RCSID(Muxing, client, "$Id$") - -static const char *ior = "file://server.ior"; -static size_t nthreads = 1; - -int -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, "k:n:"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'k': - ior = 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 " - "-k <ior> " - "-n <nthreads> " - "\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 tmp = - orb->string_to_object(ior ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - Test::Big_Reply_var reply_gen = - Test::Big_Reply::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - if (CORBA::is_nil (reply_gen.in ())) - { - ACE_ERROR_RETURN ((LM_DEBUG, - "Nil coordinator reference <%s>\n", - ior), - 1); - } - - - Client_Task client_task (reply_gen.in (), - 10, - ACE_Thread_Manager::instance ()); - - if (client_task.activate (THR_NEW_LWP | THR_JOINABLE, - nthreads, 1) == -1) - { - ACE_ERROR ((LM_ERROR, "Error activating client task\n")); - } - ACE_Thread_Manager::instance ()->wait (); - - reply_gen->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception caught:"); - return 1; - } - ACE_ENDTRY; - - return 0; -} diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Reply/run_test.pl b/TAO/tests/GIOP_Fragments/Java_Big_Reply/run_test.pl deleted file mode 100755 index d51fafed5e6..00000000000 --- a/TAO/tests/GIOP_Fragments/Java_Big_Reply/run_test.pl +++ /dev/null @@ -1,62 +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; -use Config; -sub which { - my($prog) = shift; - my($exec) = $prog; - - if (defined $ENV{'PATH'}) { - my($part) = ''; - foreach $part (split($Config{'path_sep'}, $ENV{'PATH'})) { - $part .= "/$prog"; - if ( -x $part ) { - $exec = $part; - last; - } - } - } - - return $exec; -} - -$iorfile = PerlACE::LocalFile ('server.ior'); -unlink $iorfile; - -$SV = new PerlACE::Process (which('java'), 'server'); -$CL = new PerlACE::Process ('client'); - -$SV->Spawn (); - -if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; - $SV->Kill (); $SV->TimedWait (1); - exit 1; -} - -$CL->Spawn (60); - -$client = $CL->WaitKill (60); - -if ($client1 != 0) { - print STDERR "ERROR: client 1 returned $client1\n"; - $status = 1; -} - - -$server = $SV->WaitKill (10); - -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; - $status = 1; -} - -unlink $iorfile; - -exit $status; diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Reply/server.java b/TAO/tests/GIOP_Fragments/Java_Big_Reply/server.java deleted file mode 100644 index f23d552c542..00000000000 --- a/TAO/tests/GIOP_Fragments/Java_Big_Reply/server.java +++ /dev/null @@ -1,62 +0,0 @@ -// $Id$ - -// If this server is compiled and run with the JDK ORB, it will -// fragment the GIOP Messages sent when get_big_reply() is called. - -import org.omg.CORBA.*; -import org.omg.PortableServer.*; -import Test.Big_ReplyPOA; - -class Big_ReplyImpl extends Big_ReplyPOA -{ - private org.omg.CORBA.ORB orb_; - - public byte[] get_big_reply () { - byte [] seq = new byte [1000000]; - for (int i = 0; i < seq.length; i++) - seq [i] = 'A'; - return seq; - } - - public void setORB (org.omg.CORBA.ORB orb_val) { - orb_ = orb_val; - } - - public void ping () { - } - - public void shutdown () { - orb_.shutdown (false); - } -} - - -public class server -{ - public static void main (String args[]) { - try { - ORB orb = ORB.init (args, null); - POA poa = org.omg.PortableServer.POAHelper.narrow ( - orb.resolve_initial_references ("RootPOA")); - - Big_ReplyImpl servant = new Big_ReplyImpl (); - servant.setORB (orb); - poa.activate_object (servant); - - String filename = new String ("server.ior"); - String ior = orb.object_to_string (servant._this ()); - java.io.FileWriter file = new java.io.FileWriter (filename); - file.write (ior); - file.flush (); - file.close (); - - poa.the_POAManager ().activate (); - System.out.println ("Ready..."); - orb.run (); - } - catch (Exception e) { - System.err.println ("ERROR: " + e); - e.printStackTrace (System.out); - } - } -} diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Request/Java_Big_Request.mpc b/TAO/tests/GIOP_Fragments/Java_Big_Request/Java_Big_Request.mpc deleted file mode 100644 index 3c081fa6da4..00000000000 --- a/TAO/tests/GIOP_Fragments/Java_Big_Request/Java_Big_Request.mpc +++ /dev/null @@ -1,45 +0,0 @@ -// -*- MPC -*- -// $Id$ - -project(*IDL) { - requires += java - - // Define the Java IDL with a hack output extension - // Since our idl file has a module, the generated java files - // will go int the module name so we set the extension to / - Define_Custom(JAVA_IDL) { - command = idlj - inputext = .idl - generic_outputext = / - } - - // Make sure we don't get any of the defaults - Source_Files { - } - Inline_Files { - } - Header_Files { - } - - JAVA_IDL_Files { - // The idlj will automatically put the generated files - // in the Test directory - gendir = Test - - Test.idl - } -} - -// This project will build the java server and C++ client -project(Java_Big_Request): taoexe, portableserver { - requires += java - after += *IDL - - // Define the java type - Define_Custom(JAVA) { - command = javac - commandflags = -d . - inputext = .java - generic_outputext = .class - } -} diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Request/Payload_Receiver.cpp b/TAO/tests/GIOP_Fragments/Java_Big_Request/Payload_Receiver.cpp deleted file mode 100644 index 3e0c7b01499..00000000000 --- a/TAO/tests/GIOP_Fragments/Java_Big_Request/Payload_Receiver.cpp +++ /dev/null @@ -1,45 +0,0 @@ -// -// $Id$ -// -#include "Payload_Receiver.h" - -ACE_RCSID(Big_Request_Muxing, Payload_Receiver, "$Id$") - -Payload_Receiver::Payload_Receiver (CORBA::ORB_ptr orb) - : count_ (0), - orb_(CORBA::ORB::_duplicate (orb)) -{ -} - -void -Payload_Receiver::more_data (const Test::Payload &payload - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Test::Payload_Receiver::Invalid_Payload)) -{ - ++this->count_; - - CORBA::ULong length = payload.length (); - for (CORBA::ULong i = 0; i < length; ++i) - { - if (payload[i] != 'A') - { - ACE_THROW (Test::Payload_Receiver::Invalid_Payload ()); - } - } -} - - -void -Payload_Receiver::shutdown (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER); -} - - -int -Payload_Receiver::get_count () const -{ - return count_; -} diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Request/Payload_Receiver.h b/TAO/tests/GIOP_Fragments/Java_Big_Request/Payload_Receiver.h deleted file mode 100644 index 418f80cbffa..00000000000 --- a/TAO/tests/GIOP_Fragments/Java_Big_Request/Payload_Receiver.h +++ /dev/null @@ -1,39 +0,0 @@ -// -// $Id$ -// - -#ifndef JAVA_BIG_REQUEST_PAYLOAD_RECEIVER_H -#define JAVA_BIG_REQUEST_PAYLOAD_RECEIVER_H -#include /**/ "ace/pre.h" - -#include "TestS.h" - -/// Implement the Test::Payload_Receiver interface -/** - * Simply print count how many bytes were received. - */ -class Payload_Receiver - : public virtual POA_Test::Payload_Receiver -{ -public: - /// Constructor - Payload_Receiver (CORBA::ORB_ptr orb); - - // = The skeleton methods - virtual void more_data (const Test::Payload &payload - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Test::Payload_Receiver::Invalid_Payload)); - - virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - int get_count (void) const; - -public: - int count_; - CORBA::ORB_var orb_; -}; - -#include /**/ "ace/post.h" -#endif /* JAVA_BIG_REQUEST_PAYLOAD_RECEIVER_H */ diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Request/Test.idl b/TAO/tests/GIOP_Fragments/Java_Big_Request/Test.idl deleted file mode 100644 index 902aed29cf4..00000000000 --- a/TAO/tests/GIOP_Fragments/Java_Big_Request/Test.idl +++ /dev/null @@ -1,21 +0,0 @@ -// -// $Id$ -// - -module Test -{ - typedef sequence<octet> Payload; - - interface Payload_Receiver - { - exception Invalid_Payload { - }; - - /// Send the data using a twoway operation - void more_data (in Payload the_payload) - raises (Invalid_Payload); - - /// Shudown the remote ORB - oneway void shutdown (); - }; -}; diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Request/client.java b/TAO/tests/GIOP_Fragments/Java_Big_Request/client.java deleted file mode 100644 index b3d1dd3eafb..00000000000 --- a/TAO/tests/GIOP_Fragments/Java_Big_Request/client.java +++ /dev/null @@ -1,47 +0,0 @@ -// $Id$ - -// If this server is compiled and run with the JDK ORB, it will -// fragment the GIOP Messages sent when more_data() is called. - -import java.io.FileReader; -import java.io.BufferedReader; -import org.omg.CORBA.*; -import org.omg.PortableServer.*; -import Test.Payload_Receiver; -import Test.Payload_ReceiverHelper; - -public class client -{ - public static void main (String args[]) { - try { - ORB orb = ORB.init (args, null); - - // Get the object reference - BufferedReader reader = new BufferedReader ( - new FileReader ("server.ior")); - StringBuffer ior = new StringBuffer(); - String line = null; - while ((line = reader.readLine()) != null) { - ior.append(line); - } - - org.omg.CORBA.Object obj = orb.string_to_object (ior.toString ()); - Payload_Receiver receiver = Payload_ReceiverHelper.narrow (obj); - - // Set up the payload - byte [] seq = new byte [1000000]; - for (int i = 0; i < seq.length; ++i) - seq [i] = 'A'; - - // Invoke the method on the server - for (int i = 0; i < 20; ++i) - receiver.more_data (seq); - - receiver.shutdown (); - } - catch (Exception e) { - System.err.println ("ERROR: " + e); - e.printStackTrace (System.out); - } - } -} diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Request/run_test.pl b/TAO/tests/GIOP_Fragments/Java_Big_Request/run_test.pl deleted file mode 100755 index e8514914409..00000000000 --- a/TAO/tests/GIOP_Fragments/Java_Big_Request/run_test.pl +++ /dev/null @@ -1,53 +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; - -$status = 0; -$iorfile = PerlACE::LocalFile ('server.ior'); -$TARGETHOSTNAME = 'localhost'; -$port = PerlACE::uniqueid () + 12000; - -## No ORB fragments GIOP 1.0 messages. -## The JDK ORB only fragments GIOP 1.2 messages. -foreach my $giop ('1.2') { - print "Testing GIOP $giop Fragmentation\n"; - unlink $iorfile; - - $SV = new PerlACE::Process ('server', - '-ORBEndpoint ' . - "iiop://$giop\@$TARGETHOSTNAME" . ":$port"); - $SV->Spawn (); - - if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; - $SV->Kill (); $SV->TimedWait (1); - exit 1; - } - - my($cl) = system('java client'); - if ($cl != 0) { - print STDERR "ERROR: client returned $cl\n"; - ++$status; - } - - $server = $SV->WaitKill (20); - - if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; - ++$status; - } - - unlink $iorfile; - - if ($status) { - last; - } -} - -exit $status; diff --git a/TAO/tests/GIOP_Fragments/Java_Big_Request/server.cpp b/TAO/tests/GIOP_Fragments/Java_Big_Request/server.cpp deleted file mode 100644 index cbe3a65d928..00000000000 --- a/TAO/tests/GIOP_Fragments/Java_Big_Request/server.cpp +++ /dev/null @@ -1,120 +0,0 @@ -// $Id$ - -#include "Payload_Receiver.h" -#include "ace/Get_Opt.h" -#include "ace/OS_NS_stdio.h" - -ACE_RCSID(Big_Request_Muxing, server, "$Id$") - -const char *ior_output_file = "server.ior"; - -int -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, "o:"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'o': - ior_output_file = 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[]) -{ - int status = 0; - 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; - - Payload_Receiver *payload_receiver_impl; - ACE_NEW_RETURN (payload_receiver_impl, - Payload_Receiver (orb.in ()), - 1); - PortableServer::ServantBase_var receiver_owner_transfer(payload_receiver_impl); - - Test::Payload_Receiver_var payload_receiver = - payload_receiver_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - - CORBA::String_var ior = - orb->object_to_string (payload_receiver.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - // If the ior_output_file exists, output the ior to it - 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; - - if (payload_receiver_impl->get_count () != 20) - { - ACE_ERROR ((LM_ERROR, - "ERROR: %d is not the correct " - "number of calls\n", - payload_receiver_impl->get_count ())); - ++status; - } - - root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception caught:"); - ++status; - } - ACE_ENDTRY; - - return status; -} diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/.cvsignore b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/.cvsignore deleted file mode 100644 index 254defddb53..00000000000 --- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -server diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/PMB_With_Fragments.mpc b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/PMB_With_Fragments.mpc deleted file mode 100644 index 85905a99a88..00000000000 --- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/PMB_With_Fragments.mpc +++ /dev/null @@ -1,5 +0,0 @@ -// -*- MPC -*- -// $Id$ - -project: taoserver { -} diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Payload_Receiver.cpp b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Payload_Receiver.cpp deleted file mode 100644 index 8dd53b815ec..00000000000 --- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Payload_Receiver.cpp +++ /dev/null @@ -1,45 +0,0 @@ -// -// $Id$ -// -#include "Payload_Receiver.h" - -ACE_RCSID(PMB_With_Fragments, Payload_Receiver, "$Id$") - -Payload_Receiver::Payload_Receiver (CORBA::ORB_ptr orb) - : count_ (0), - orb_(CORBA::ORB::_duplicate (orb)) -{ -} - -void -Payload_Receiver::more_data (const Test::Payload &payload - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Test::Payload_Receiver::Invalid_Payload)) -{ - ++this->count_; - - CORBA::ULong length = payload.length (); - for (CORBA::ULong i = 0; i < length; ++i) - { - if (payload[i] != 'A') - { - ACE_THROW (Test::Payload_Receiver::Invalid_Payload ()); - } - } -} - - -void -Payload_Receiver::shutdown (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)) -{ - this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER); -} - - -int -Payload_Receiver::get_count () const -{ - return count_; -} diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Payload_Receiver.h b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Payload_Receiver.h deleted file mode 100644 index b9ced6d7672..00000000000 --- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Payload_Receiver.h +++ /dev/null @@ -1,39 +0,0 @@ -// -// $Id$ -// - -#ifndef PMB_WITH_FRAGMENTS_PAYLOAD_RECEIVER_H -#define PMB_WITH_FRAGMENTS_PAYLOAD_RECEIVER_H -#include /**/ "ace/pre.h" - -#include "TestS.h" - -/// Implement the Test::Payload_Receiver interface -/** - * Simply print count how many bytes were received. - */ -class Payload_Receiver - : public virtual POA_Test::Payload_Receiver -{ -public: - /// Constructor - Payload_Receiver (CORBA::ORB_ptr orb); - - // = The skeleton methods - virtual void more_data (const Test::Payload &payload - ACE_ENV_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException, - Test::Payload_Receiver::Invalid_Payload)); - - virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL) - ACE_THROW_SPEC ((CORBA::SystemException)); - - int get_count (void) const; - -public: - int count_; - CORBA::ORB_var orb_; -}; - -#include /**/ "ace/post.h" -#endif /* PMB_WITH_FRAGMENTS_PAYLOAD_RECEIVER_H */ diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/README b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/README deleted file mode 100644 index f29f1d236ec..00000000000 --- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/README +++ /dev/null @@ -1,21 +0,0 @@ -In order to regenerate the data files, you will need to perform the -following steps: - -1) Instrument TAO_Transport to write a copy of each data block into a file -that was read from a socket by applying Transport.patch. - -2) Temporarily change ../Java_Big_Request/client.java to send only 2 -requests. - -3) Run the server from PMB_With_Fragments and the java client from -../Java_Big_Request. - -Start the server: - -server -ORBEndpoint iiop://localhost:11000 -o ../Java_Big_Request/server.ior - -Then run the java client: - -java client - -4) Move the generated data file to the correct name. diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Test.idl b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Test.idl deleted file mode 100644 index 39951f72137..00000000000 --- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Test.idl +++ /dev/null @@ -1,21 +0,0 @@ -// -// $Id$ -// - -module Test -{ - typedef sequence<octet> Payload; - - interface Payload_Receiver - { - exception Invalid_Payload { - }; - - /// Send the data using a twoway operation - void more_data (in Payload the_payload) - raises (Invalid_Payload); - - /// Shutdown the remote ORB - oneway void shutdown (); - }; -}; diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Transport.patch b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Transport.patch deleted file mode 100644 index 65433d35488..00000000000 --- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/Transport.patch +++ /dev/null @@ -1,70 +0,0 @@ -Index: Transport.cpp -=================================================================== -RCS file: /project/cvs-repository/ACE_wrappers-repository/TAO/tao/Transport.cpp,v -retrieving revision 1.115 -diff -u -r1.115 Transport.cpp ---- Transport.cpp 7 Feb 2005 19:27:20 -0000 1.115 -+++ Transport.cpp 21 Feb 2005 14:23:10 -0000 -@@ -106,6 +106,29 @@ - ACE_Log_Msg::instance ()->release (); - } - -+#define TAO_DUMP_TRANSPORT_DATA -+ -+#if defined (TAO_DUMP_TRANSPORT_DATA) -+static void -+dump_transport_data(size_t id, -+ const ACE_Message_Block* message_block) -+{ -+ char dump_path[PATH_MAX]; -+ ACE_OS::sprintf(dump_path, "transport_data_dump_%d.dat", id); -+ -+ ACE_HANDLE dump_out = ACE_OS::open(dump_path, O_WRONLY|O_APPEND); -+ if (dump_out == ACE_INVALID_HANDLE) { -+ dump_out = ACE_OS::open(dump_path, O_WRONLY|O_CREAT, -+ ACE_DEFAULT_FILE_PERMS); -+ } -+ if (dump_out != ACE_INVALID_HANDLE) { -+ ACE_OS::write(dump_out, -+ message_block->rd_ptr (), message_block->length ()); -+ ACE_OS::close(dump_out); -+ } -+} -+#endif /* TAO_DUMP_TRANSPORT_DATA */ -+ - TAO_Transport::TAO_Transport (CORBA::ULong tag, - TAO_ORB_Core *orb_core) - : tag_ (tag) -@@ -1332,6 +1355,10 @@ - // Set the write pointer in the stack buffer - message_block.wr_ptr (n); - -+#if defined (TAO_DUMP_TRANSPORT_DATA) -+ dump_transport_data (this->id (), &message_block); -+#endif /* TAO_DUMP_TRANSPORT_DATA */ -+ - // Parse the message and try consolidating the message if - // needed. - retval = this->parse_consolidate_messages (message_block, -@@ -1551,6 +1578,10 @@ - - incoming.wr_ptr (n); - missing_data -= n; -+ -+#if defined (TAO_DUMP_TRANSPORT_DATA) -+ dump_transport_data (this->id (), &incoming); -+#endif /* TAO_DUMP_TRANSPORT_DATA */ - } - - // If we got an error.. -@@ -1981,6 +2012,10 @@ - // Move the write pointer - qd->msg_block_->wr_ptr (n); - -+#if defined (TAO_DUMP_TRANSPORT_DATA) -+ dump_transport_data (this->id (), qd->msg_block_); -+#endif /* TAO_DUMP_TRANSPORT_DATA */ -+ - // Decrement the missing data - qd->missing_data_ -= n; - diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/dribble.pl b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/dribble.pl deleted file mode 100755 index 26a561aa58b..00000000000 --- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/dribble.pl +++ /dev/null @@ -1,150 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -w -S $0 ${1+"$@"}' - & eval 'exec perl -w -S $0 $argv:q' - if 0; - -# ****************************************************************** -# Author: Chris Cleeland -# Date: 10/26/2002 -# $Id$ -# ****************************************************************** - -use Getopt::Long; -use File::Basename; -use IO::Socket::INET; -use IO::File; -use Carp; - -sub getnum { - use POSIX qw(strtoul); - my $str = shift; - $str =~ s/^\s+//; - $str =~ s/\s+$//; - $! = 0; - my($num, $unparsed) = strtoul($str); - if (($str eq '') || ($unparsed != 0) || $!) { - return undef; - } else { - return $num; - } -} - -my $corba_server_addr = "127.0.0.1"; -my $corba_server_port = 12345; -my $progress_interval = 10; -my $verbosity = 0; -my $interactive = undef; -my $datastreamfile = 'datastream.dat'; -my $dataxmitlayoutfile = undef; -my $delay = .25; - -my %options = ('host|h=s' => \$corba_server_addr, - 'port|p=s' => \$corba_server_port, - 'interval|i=i' => \$progress_interval, - 'verbose|verbosity|v+' => \$verbosity, - 'interactive' => \$interactive, - 'stream|s=s' => \$datastreamfile, - 'layout|l=s' => \$dataxmitlayoutfile, - 'delay|d=f' => \$delay, - ); -my $result = GetOptions (%options); - -if (!$result) { - my($str) = 'Usage: ' . basename($0); - my($initial) = length($str); - my($length) = $initial; - my($maxLine) = 78; - - print $str; - - foreach my $key (sort keys %options) { - my($opt, $type) = split(/[|=]/, $key); - my($str) = " [--$opt" . (defined $type ? " <$opt>" : "") . "]"; - my($len) = length($str); - if ($length + $len > $maxLine) { - print "\n" . (" " x $initial); - $length = $initial; - } - print $str; - $length += $len; - } - print "\n"; - exit(0); -} - -croak "Must supply a data file using --stream and a layout file using --layout" - unless defined $datastreamfile && defined $dataxmitlayoutfile; - -my $sock = IO::Socket::INET->new(PeerAddr => $corba_server_addr, - PeerPort => $corba_server_port, - Proto => 'tcp') - or croak "Unable to establish connection to $corba_server_addr:$corba_server_port: $!\n"; - -# -# Infer a name for the layout file -# -if (! defined $dataxmitlayoutfile) { - $dataxmitlayoutfile = $datastreamfile; - $dataxmitlayoutfile =~ s/\.dat$/\.layout/; -} - -# Now we just start reading from <> and writing to the socket We -# currently assume all are oneways, so we don't worry about reading -# from the socket. - -my $stream = new IO::File $datastreamfile, "r" - or croak "Unable to open $datastreamfile for reading: $!"; -my $layout = new IO::File $dataxmitlayoutfile, "r" - or croak "Unable to open $dataxmitlayoutfile for reading: $!"; - -$| = 1; -print "Sending...(1 dot every $progress_interval hunks)\n"; -print "Hit <RETURN> key to send a packet\n" if defined $interactive; -my $numread; -do { - - # - # Determine the size of the hunk we have to read/send - # - $_ = $layout->getline; - s/#.*$//; - chomp $_; - next if ($_ =~ /^\s*$/); - - my $requested_hunksize = getnum($_); - my $l = $layout->input_line_number; - - my $hunk; - - # - # Read in the hunk size we want - # - $numread = $stream->sysread($hunk, $requested_hunksize); - if (! defined $numread) { - carp "\nHunk $l: Error reading from stream: $!"; - next; - } - elsif ($numread != $requested_hunksize) { - carp "\nHunk $l: short read (expected $requested_hunksize, got $numread); going on."; - } - - print "Hunk $l: length ", length($hunk), "\n" if ($verbosity >= 1); - if (defined $interactive) { - <STDIN>; - } - else { - select(undef, undef, undef, $delay); - } - - my $ret = $sock->send($hunk, 0); - if ($ret != length($hunk)) { - carp "\nHunk $l: problem sending hunk $.: $!\n"; - exit(1); - } - - print "." if ($. % $progress_interval == 0); -} until $numread == 0 || $layout->eof; -print "\nDone.\n"; - -## Sleep 1 second to allow the socket on Windows to get flushed -## before it's destroyed and this process exits. -sleep(1); diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments.dat b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments.dat Binary files differdeleted file mode 100644 index c09b63a7cc1..00000000000 --- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments.dat +++ /dev/null diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments.layout b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments.layout deleted file mode 100644 index cb44db16b3e..00000000000 --- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments.layout +++ /dev/null @@ -1,86 +0,0 @@ -2 -2 -6 -2 -3 -9 -272 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -18462 diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments_be.dat b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments_be.dat Binary files differdeleted file mode 100644 index 9b9e637d489..00000000000 --- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments_be.dat +++ /dev/null diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments_be.layout b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments_be.layout deleted file mode 100644 index dfa5d7a16b9..00000000000 --- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/giop1.2_fragments_be.layout +++ /dev/null @@ -1,86 +0,0 @@ -2 -2 -6 -2 -3 -9 -272 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -25815 -18500 diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/run_test.pl b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/run_test.pl deleted file mode 100755 index c8c8761853f..00000000000 --- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/run_test.pl +++ /dev/null @@ -1,57 +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; - -$status = 0; -$iorfile = PerlACE::LocalFile ('server.ior'); -$TARGETHOSTNAME = 'localhost'; -$port = PerlACE::uniqueid () + 12000; -$debug = 0; -$endien = (pack('L', 0x41424344) eq 'ABCD' ? '_be' : ''); - -unlink $iorfile; - -if (PerlACE::is_vxworks_test()) { - $TARGETHOSTNAME = $ENV{'ACE_RUN_VX_TGT_HOST'}; - $SV = new PerlACE::ProcessVX ('server', - '-ORBEndpoint ' . - "iiop://$TARGETHOSTNAME" . ":$port " . - "-ORBDebugLevel $debug"); -} -else { - $SV = new PerlACE::Process ('server', - '-ORBEndpoint ' . - "iiop://$TARGETHOSTNAME" . ":$port " . - "-ORBDebugLevel $debug"); -} -$SV->Spawn (); - -if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; - $SV->Kill (); $SV->TimedWait (1); - exit 1; -} - -my($cl) = system("$^X dribble.pl --host=$TARGETHOSTNAME --port=$port " . - "--stream=giop1.2_fragments$endien.dat " . - "--layout=giop1.2_fragments$endien.layout"); -if ($cl != 0) { - print STDERR "ERROR: client returned $cl\n"; - ++$status; -} - -$server = $SV->WaitKill (10); - -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; - ++$status; -} - -unlink $iorfile; -exit $status; diff --git a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/server.cpp b/TAO/tests/GIOP_Fragments/PMB_With_Fragments/server.cpp deleted file mode 100644 index 166b514f35c..00000000000 --- a/TAO/tests/GIOP_Fragments/PMB_With_Fragments/server.cpp +++ /dev/null @@ -1,138 +0,0 @@ -// $Id$ - -#include "Payload_Receiver.h" -#include "ace/Get_Opt.h" -#include "ace/OS_NS_stdio.h" - -ACE_RCSID(Big_Request_Muxing, server, "$Id$") - -const char *ior_output_file = "server.ior"; - -int -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opts (argc, argv, "o:"); - int c; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'o': - ior_output_file = 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[]) -{ - int status = 0; - 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; - - PortableServer::LifespanPolicy_var lifespan = - root_poa->create_lifespan_policy (PortableServer::PERSISTENT); - CORBA::PolicyList policy_list; - policy_list.length (1); - policy_list[0] = PortableServer::LifespanPolicy::_duplicate ( - lifespan.in ()); - PortableServer::POA_var persistent_poa = - root_poa->create_POA ("PersistentPOA", poa_manager.in (), - policy_list); - lifespan->destroy (); - - - Payload_Receiver *payload_receiver_impl = 0; - ACE_NEW_RETURN (payload_receiver_impl, - Payload_Receiver (orb.in ()), - 1); - PortableServer::ServantBase_var receiver_owner_transfer(payload_receiver_impl); - - PortableServer::ObjectId_var id = - persistent_poa->activate_object (payload_receiver_impl - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - CORBA::Object_var obj = - persistent_poa->id_to_reference (id.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - CORBA::String_var ior = - orb->object_to_string (obj.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - // If the ior_output_file exists, output the ior to it - 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; - - if (payload_receiver_impl->get_count () != 2) - { - ACE_ERROR ((LM_ERROR, - "ERROR: %d is not the correct " - "number of calls\n", - payload_receiver_impl->get_count ())); - ++status; - } - - root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; - - orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; - } - ACE_CATCHANY - { - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception caught:"); - ++status; - } - ACE_ENDTRY; - - return status; -} |