diff options
Diffstat (limited to 'TAO/tests/NestedUpcall')
-rw-r--r-- | TAO/tests/NestedUpcall/Makefile | 68 | ||||
-rw-r--r-- | TAO/tests/NestedUpcall/NestedUpcall.dsw | 41 | ||||
-rw-r--r-- | TAO/tests/NestedUpcall/README | 54 | ||||
-rw-r--r-- | TAO/tests/NestedUpcall/Reactor.idl | 51 | ||||
-rw-r--r-- | TAO/tests/NestedUpcall/client.cpp | 181 | ||||
-rw-r--r-- | TAO/tests/NestedUpcall/client.dsp | 164 | ||||
-rw-r--r-- | TAO/tests/NestedUpcall/eh_i.cpp | 48 | ||||
-rw-r--r-- | TAO/tests/NestedUpcall/eh_i.h | 30 | ||||
-rw-r--r-- | TAO/tests/NestedUpcall/reactor_i.cpp | 78 | ||||
-rw-r--r-- | TAO/tests/NestedUpcall/reactor_i.h | 36 | ||||
-rw-r--r-- | TAO/tests/NestedUpcall/server.cpp | 129 | ||||
-rw-r--r-- | TAO/tests/NestedUpcall/server.dsp | 162 | ||||
-rw-r--r-- | TAO/tests/NestedUpcall/svc.conf | 49 |
13 files changed, 0 insertions, 1091 deletions
diff --git a/TAO/tests/NestedUpcall/Makefile b/TAO/tests/NestedUpcall/Makefile deleted file mode 100644 index 6a3a390d9f2..00000000000 --- a/TAO/tests/NestedUpcall/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -#---------------------------------------------------------------------------- -# -# $Id$ -# -# Top-level Makefile for the ACE-ified Sun Ref. implementation -# of IIOP ORB -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -ifndef TAO_ROOT - TAO_ROOT = $(ACE_ROOT)/TAO -endif # ! TAO_ROOT - -LDLIBS = -lTAO - -IDL_FILES = Reactor -IDL_SRC = $(IDL_FILES:%=%.idl) -IDL_GENERATED = $(foreach idlfile,$(IDL_FILES),$(addprefix $(idlfile),C.cpp S.cpp)) -PROG_SRCS = $(IDL_GENERATED) server.cpp client.cpp \ - reactor_i.cpp eh_i.cpp tmplinst.cpp - -LSRC = $(PROG_SRCS) - -SVR_OBJS = $(IDL_GENERATED:%.cpp=%.o) server.o reactor_i.o #tmplinst.o -CLT_OBJS = $(IDL_GENERATED:%.cpp=%.o) client.o eh_i.o #tmplinst.o - -BIN = server client -BUILD = $(BIN) -VLDLIBS = $(LDLIBS:%=%$(VAR)) -VBIN = $(BIN:%=%$(VAR)) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(TAO_ROOT)/rules.tao.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU -include $(TAO_ROOT)/taoconfig.mk - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -DCFLAGS = -g - -server: $(addprefix $(VDIR),$(SVR_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) - -client: $(addprefix $(VDIR),$(CLT_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) - -.PRECIOUS: $(IDL_GENERATED) - -realclean: clean - -/bin/rm -rf $(IDL_GENERATED) - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/tests/NestedUpcall/NestedUpcall.dsw b/TAO/tests/NestedUpcall/NestedUpcall.dsw deleted file mode 100644 index f6006d20cb7..00000000000 --- a/TAO/tests/NestedUpcall/NestedUpcall.dsw +++ /dev/null @@ -1,41 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 5.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "client"=.\client.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "server"=.\server.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/TAO/tests/NestedUpcall/README b/TAO/tests/NestedUpcall/README deleted file mode 100644 index 29153b044e8..00000000000 --- a/TAO/tests/NestedUpcall/README +++ /dev/null @@ -1,54 +0,0 @@ --*- indented-text -*- - -$Id$ - - BACKGROUND - ========== - -This example tests the scenario of nested upcalls. For example, a -particular process may need to act in both the role of client and -server. This interaction is common in situations where the process -makes a twoway invocation on a remote servant, passing a local object -reference 'o' to that servant. In the process of servicing that -invocation, the servant makes a twoway invocation on 'o'. - -In this example, we draw upon an interaction of this sort which should -be familiar to anyone who's used ACE: the process of registering a -handler with a Reactor. The EventHandler is the local object -reference, and the Reactor the remote servant. NOTE: This example in -no way should be construed as testimony that remote Reactors make -sense or are in any way useful. It is merely a motivating example! - - EXECUTION - ========= - -server ------- - -$ server [orb options] [-d] - -where - -d turns on debugging messages - - -client ------- - -$ client [orb options] [-d] [-f ior_file] [-k ior_string] - -where - -d turns on debugging messages - - -f specifies the name of a file in which the IOR - for the Reactor can be found - - -k specifies a string which is the IOR of the Reactor - - -NOTES ------ - -If running both on the same machine, it will be necessary to specify a -different port for each the client and the server using -ORBport on -the command line. This is because there is also a servant within the -confines of the client executable. diff --git a/TAO/tests/NestedUpcall/Reactor.idl b/TAO/tests/NestedUpcall/Reactor.idl deleted file mode 100644 index 2fc1d0acb22..00000000000 --- a/TAO/tests/NestedUpcall/Reactor.idl +++ /dev/null @@ -1,51 +0,0 @@ -// $Id$ -// -// ============================================================================ -// -// = LIBRARY -// TAO/tests/NestedUpcall -// -// = FILENAME -// Reactor.idl -// -// = DESCRIPTION -// A simple test of nested upcalls using a structure we likely all -// know and love. -// -// Existence of this interface should not be taken as testimony that -// such a structure would work in ACE! There is no such thing as an -// IDL interface to the Reactor (yet)! -// -// = AUTHORS -// Chris Cleeland -// -// ============================================================================ - -interface Reactor; - -interface EventHandler -{ - Long peer (); - // Returns an integer corresponding to the event handler's file - // descriptor. - - UShort decrement (in Reactor r, in UShort num); - // Decrements <num> by invoking the <decrement> operation on <r> - // and returning that value, finally stopping when it gets to zero. -}; - -interface Reactor -{ - Long register_handler (in EventHandler eh); - // Turns around and queries <eh> for the peer. - - oneway void set_value (); - // do-nothing oneway to check for proper operation. - - UShort decrement (in EventHandler eh, in UShort num); - // Decrements <num> by invoking the <decrement> operation on <eh> - // and returning that value, finally stopping when it gets to zero. - - void stop (); - // Stops the reactor. -}; diff --git a/TAO/tests/NestedUpcall/client.cpp b/TAO/tests/NestedUpcall/client.cpp deleted file mode 100644 index b47d00f2035..00000000000 --- a/TAO/tests/NestedUpcall/client.cpp +++ /dev/null @@ -1,181 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/tests -// -// = FILENAME -// client.cpp -// -// = AUTHOR -// Chris Cleeland -// -// ============================================================================ - -#include "ace/Auto_Ptr.h" -#include "ace/Get_Opt.h" - -#include "tao/corba.h" - -#include "eh_i.h" - -CORBA::String_var remote_reactor_key = (char *) 0; - -// Completely arbitrary constant that ought to be big enough. -#define MAX_IOR_SIZE 4096 - -int -parse_args (int argc_, char* argv_[]) -{ - ACE_Get_Opt get_opts (argc_, argv_, "df:k:"); - int c; - char temp_buf[MAX_IOR_SIZE]; - char *result = 0; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'd': // debug flag - TAO_debug_level++; - break; - case 'f': - { - FILE *ior_file_ = - ACE_OS::fopen (get_opts.optarg,"r"); - - if (ior_file_ == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to open %s for writing: %p\n", - get_opts.optarg, "open"), -1); - - result = ACE_OS::fgets (temp_buf, MAX_IOR_SIZE, ior_file_); - if (result == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to read ior from file %s: %p\n", - get_opts.optarg, - "fgets"), - -1); - - remote_reactor_key = - CORBA::string_copy (temp_buf); - ACE_OS::fclose (ior_file_); - } - break; - case 'k': - remote_reactor_key = - CORBA::string_copy (get_opts.optarg); - break; - case '?': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" - " [-d]" - " [-f ior-key-file]" - " [-k ior-as-string]" - "\n", - argv_ [0]), - -1); - } - - // Indicates successful parsing of command line. - return 0; -} - -int -main (int argc, char *argv[]) -{ - TAO_TRY - { - CORBA::ORB_var orb = CORBA::ORB_init (argc, - argv, - "client", - TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Initialize the object adapter. - CORBA::Object_var poa_object = - orb->resolve_initial_references ("RootPOA"); - 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 (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - parse_args (argc, argv); - - if (remote_reactor_key.in () == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "%s: no remote Reactor key specified\n"), - -1); - - CORBA::Object_var reactor_object = - orb->string_to_object (ACE_const_cast(char*, remote_reactor_key.in ()), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - Reactor_var remote_reactor = Reactor::_narrow (reactor_object.in (), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - if (CORBA::is_nil (remote_reactor.in ())) - ACE_ERROR_RETURN ((LM_ERROR, - "%s: invalid Reactor key <%s>\n", - argv[0], remote_reactor_key.in ()), -1); - - // Create an EventHandler servant to hand to the other side... - auto_ptr<EventHandler_i> eh_impl (new EventHandler_i); - EventHandler_var eh = eh_impl->_this (TAO_TRY_ENV); - - // Get into the event loop briefly...just to make sure that the - // ORB gets a chance to set things up for us to be a server. - // What this really means is that there's a listening port. - // - // The bad thing is that we have to do something non-standard - // such as call orb->run() with a zero timeout. It would be - // nice if the spec gave us a standard way to do this. - if (orb->run (ACE_Time_Value::zero) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%s: %p\n", - argv[0], "unable to get the ORB Core to listen"), - -1); - - // Now, after all that, we can invoke an operation on the remote - // side. - CORBA::Long r = remote_reactor->register_handler (eh.in (), TAO_TRY_ENV); - - // We ought to have a result! - ACE_DEBUG ((LM_DEBUG, - "%s: received %d as return from register_handler ()\n", - argv[0], r)); - - remote_reactor->set_value (TAO_TRY_ENV); - TAO_CHECK_ENV; - - remote_reactor->decrement (eh.in (), 5, TAO_TRY_ENV); - TAO_CHECK_ENV; - - remote_reactor->stop (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("main"); - return 1; - } - TAO_ENDTRY; - - return 0; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class auto_ptr<EventHandler_i>; -template class ACE_Auto_Basic_Ptr<EventHandler_i>; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate auto_ptr<EventHandler_i> -#pragma instantiate ACE_Auto_Basic_Ptr<EventHandler_i> -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/tests/NestedUpcall/client.dsp b/TAO/tests/NestedUpcall/client.dsp deleted file mode 100644 index 2c6b4cc2c8a..00000000000 --- a/TAO/tests/NestedUpcall/client.dsp +++ /dev/null @@ -1,164 +0,0 @@ -# Microsoft Developer Studio Project File - Name="client" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=client - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "client.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "client.mak" CFG="client - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "client - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "client - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "client - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\.." /I "..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 TAO.lib ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\ace" /libpath:"..\..\tao"
-
-!ELSEIF "$(CFG)" == "client - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\.." /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 TAO.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\ace" /libpath:"..\..\tao"
-
-!ENDIF
-
-# Begin Target
-
-# Name "client - Win32 Release"
-# Name "client - Win32 Debug"
-# Begin Source File
-
-SOURCE=.\client.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\eh_i.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Reactor.idl
-
-!IF "$(CFG)" == "client - Win32 Release"
-
-# Begin Custom Build
-InputPath=.\Reactor.idl
-InputName=Reactor
-
-BuildCmds= \
- ..\..\TAO_IDL\tao_idl $(InputName).idl
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "client - Win32 Debug"
-
-# Begin Custom Build
-InputPath=.\Reactor.idl
-InputName=Reactor
-
-BuildCmds= \
- ..\..\TAO_IDL\tao_idl $(InputName).idl
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\ReactorC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\ReactorS.cpp
-# End Source File
-# End Target
-# End Project
diff --git a/TAO/tests/NestedUpcall/eh_i.cpp b/TAO/tests/NestedUpcall/eh_i.cpp deleted file mode 100644 index 95821243136..00000000000 --- a/TAO/tests/NestedUpcall/eh_i.cpp +++ /dev/null @@ -1,48 +0,0 @@ -// $Id$ - -#include "tao/corba.h" -#include "eh_i.h" - -// CTOR -EventHandler_i::EventHandler_i (void) -{ -} - -// DTOR -EventHandler_i::~EventHandler_i (void) -{ -} - -// Return a long -CORBA::Long -EventHandler_i::peer (CORBA::Environment &env) -{ - // Doesn't matter what value we return! - CORBA::Long val = 6; - - ACE_DEBUG ((LM_DEBUG, - "EventHandler_i::peer() returning %d\n", - val)); - - return val; -} - -CORBA::UShort -EventHandler_i::decrement (Reactor_ptr eh, - CORBA::UShort num, - CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, "%{%I(%P|%t) EventHandler::decrement (%d)%$", num)); - - CORBA::UShort ret; - if (--num <= 0) - ret = 0; - else - { - ACE_DEBUG ((LM_DEBUG, "(%P|%t) EventHandler::decrement() invoking Reactor::decrement(%d)%$", num)); - ret = eh->decrement (_this (env), num, env); - } - ACE_DEBUG ((LM_DEBUG, "%}(%P|%t) EventHandler::decrement() returning %d%$", ret)); - return ret; -} - diff --git a/TAO/tests/NestedUpcall/eh_i.h b/TAO/tests/NestedUpcall/eh_i.h deleted file mode 100644 index 3be2aa8f3ca..00000000000 --- a/TAO/tests/NestedUpcall/eh_i.h +++ /dev/null @@ -1,30 +0,0 @@ -// -*- c++ -*- -// $Id$ - -#if !defined (EVENTHANDLER_I_H) -# define EVENTHANDLER_I_H - -#include "ReactorS.h" - -class EventHandler_i : public POA_EventHandler -{ - // = TITLE - // Servant implementation for the <EventHandler> IDL interface. -public: - EventHandler_i (void); - // Constructor. - - virtual ~EventHandler_i (void); - // Destructor. - - virtual CORBA::Long peer (CORBA::Environment &env); - // Return some value...doesn't matter what. - - virtual CORBA::UShort decrement (Reactor_ptr eh, - CORBA::UShort num, - CORBA::Environment &env); - // deccrement <num> by calling decrement thru <eh> until zero is - // reached, then return. -}; - -#endif /* EVENTHANDLER_I_H */ diff --git a/TAO/tests/NestedUpcall/reactor_i.cpp b/TAO/tests/NestedUpcall/reactor_i.cpp deleted file mode 100644 index cb0010f82de..00000000000 --- a/TAO/tests/NestedUpcall/reactor_i.cpp +++ /dev/null @@ -1,78 +0,0 @@ -// $Id$ - -#include "tao/corba.h" -#include "reactor_i.h" - -// CTOR -Reactor_i::Reactor_i (void) -{ -} - -// DTOR -Reactor_i::~Reactor_i (void) -{ -} - -// register...with nothing -CORBA::Long -Reactor_i::register_handler (EventHandler_ptr eh, - CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) BEGIN Reactor_i::register_handler ()\n")); - - CORBA::Long r = 0; - - TAO_TRY - { - r = eh->peer (TAO_TRY_ENV); - TAO_CHECK_ENV; - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("getting peer"); - } - TAO_ENDTRY; - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) got this value from peer: %d\n", - r)); - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) END Reactor_i::register_handler ()\n")); - return 0; -} - -void -Reactor_i::set_value (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) doing Reactor_i::set_value()\n")); -} - -CORBA::UShort -Reactor_i::decrement (EventHandler_ptr eh, - CORBA::UShort num, - CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, "%{%I(%P|%t) Reactor::decrement (%d)%$", num)); - - CORBA::UShort ret; - if (--num <= 0) - ret = 0; - else - { - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Reactor::decrement() invoking EventHandler::decrement(%d)%$", num)); - Reactor_var me = _this (env); - ret = eh->decrement (me.in (), num, env); - } - ACE_DEBUG ((LM_DEBUG, "%}(%P|%t) Reactor::decrement() returning %d\n", ret)); - return ret; -} - -void -Reactor_i::stop (CORBA::Environment &env) -{ - ACE_DEBUG ((LM_DEBUG, "(%P|%t) stopping.\n")); - TAO_ORB_Core_instance ()->orb ()->shutdown (); -} diff --git a/TAO/tests/NestedUpcall/reactor_i.h b/TAO/tests/NestedUpcall/reactor_i.h deleted file mode 100644 index 3d4ede734c9..00000000000 --- a/TAO/tests/NestedUpcall/reactor_i.h +++ /dev/null @@ -1,36 +0,0 @@ -// -*- c++ -*- -// $Id$ - -#if !defined (REACTOR_I_H) -# define REACTOR_I_H - -#include "ReactorS.h" - -class Reactor_i : public POA_Reactor -{ - // = TITLE - // Implement the <Reactor> IDL interface. -public: - Reactor_i (void); - // Constructor. - - virtual ~Reactor_i (void); - // Destructor. - - virtual CORBA::Long register_handler(EventHandler_ptr eh, - CORBA::Environment &env); - // Register (with nothing...it's an example!) - - virtual void set_value (CORBA::Environment &env); - - virtual CORBA::UShort decrement (EventHandler_ptr eh, - CORBA::UShort num, - CORBA::Environment &env); - // deccrement <num> by calling decrement thru <eh> until zero is - // reached, then return. - - virtual void stop (CORBA::Environment &env); - // Stops the reactor. -}; - -#endif /* REACTOR_I_H */ diff --git a/TAO/tests/NestedUpcall/server.cpp b/TAO/tests/NestedUpcall/server.cpp deleted file mode 100644 index 161e5e98e7b..00000000000 --- a/TAO/tests/NestedUpcall/server.cpp +++ /dev/null @@ -1,129 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/tests -// -// = FILENAME -// server.cpp -// -// = AUTHOR -// Chris Cleeland -// -// ============================================================================ - -#include "tao/corba.h" -#include "tao/TAO.h" -#include "reactor_i.h" - -int -main (int argc, char* argv[]) -{ - ACE_DEBUG ((LM_DEBUG, - "NestedUpcall server starting\n")); - - TAO_TRY - { -#if defined(DONT_USE_ORBMGR) - // @@ Chris, can you please try to replace most of this boiler - // plate code with the TAO_Object_Manager stuff that Sumedh has - // devised? If we need to generalize his implementation to - // handle some of the things you do (e.g., create a special - // POAManager) please let me know. - CORBA::ORB_var orb = - CORBA::ORB_init (argc, argv, "server", TAO_TRY_ENV); - TAO_CHECK_ENV; - - // Initialize the object adapter. - CORBA::Object_var poa_object = - orb->resolve_initial_references("RootPOA"); - - 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(), - TAO_TRY_ENV); - TAO_CHECK_ENV; - - PortableServer::POAManager_var poa_manager = - root_poa->the_POAManager (TAO_TRY_ENV); - TAO_CHECK_ENV; - - PortableServer::PolicyList policies (2); - policies.length (2); - policies[0] = - root_poa->create_id_assignment_policy (PortableServer::USER_ID, - TAO_TRY_ENV); - policies[1] = - root_poa->create_lifespan_policy (PortableServer::PERSISTENT, - TAO_TRY_ENV); - - // We use a different POA, otherwise the user would have to - // change the object key each time it invokes the server. - PortableServer::POA_var poa = - root_poa->create_POA ("Persistent_POA", - poa_manager.in (), - policies, - TAO_TRY_ENV); - TAO_CHECK_ENV; -#else - TAO_ORB_Manager om; - - om.init_child_poa (argc, argv, "Persistent_POA", TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA_ORB_var orb = om.orb (); -#endif - - - // Now that we've got all that done, we need to create our impl - // and register! - Reactor_i *reactor_impl = 0; - ACE_NEW_RETURN (reactor_impl, Reactor_i, -1); -#if defined(DONT_USE_ORBMGR) - PortableServer::ObjectId_var id = - PortableServer::string_to_ObjectId ("Reactor"); - - poa->activate_object_with_id (id.in (), - reactor_impl, TAO_TRY_ENV); -#else - CORBA::String s = om.activate_under_child_poa ("Reactor", reactor_impl, TAO_TRY_ENV); - CORBA::string_free (s); -#endif - TAO_CHECK_ENV; - - - // Stringify the object - Reactor_ptr reactor = reactor_impl->_this (TAO_TRY_ENV); - TAO_CHECK_ENV; - - CORBA::String_var str = - orb->object_to_string (reactor, TAO_TRY_ENV); - TAO_CHECK_ENV; - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) The reactor IOR is <%s>\n", - str.in ())); - - // Run the server now. -#if defined(DONT_USE_ORBMGR) - orb->run (); -#else - om.run (TAO_TRY_ENV); -#endif - CORBA::release (reactor); - } - TAO_CATCHANY - { - TAO_TRY_ENV.print_exception ("orb_init"); - return -1; - } - TAO_ENDTRY; - - ACE_DEBUG ((LM_DEBUG, "NestedUpcall server ending\n")); - return 0; -} diff --git a/TAO/tests/NestedUpcall/server.dsp b/TAO/tests/NestedUpcall/server.dsp deleted file mode 100644 index a3324e9ea70..00000000000 --- a/TAO/tests/NestedUpcall/server.dsp +++ /dev/null @@ -1,162 +0,0 @@ -# Microsoft Developer Studio Project File - Name="server" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=server - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "server.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "server.mak" CFG="server - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "server - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "server - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "server - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\.." /I "..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 TAO.lib ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\ace" /libpath:"..\..\tao"
-
-!ELSEIF "$(CFG)" == "server - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\.." /I "..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 TAO.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\ace" /libpath:"..\..\tao"
-
-!ENDIF
-
-# Begin Target
-
-# Name "server - Win32 Release"
-# Name "server - Win32 Debug"
-# Begin Source File
-
-SOURCE=.\Reactor.idl
-
-!IF "$(CFG)" == "server - Win32 Release"
-
-# Begin Custom Build
-InputPath=.\Reactor.idl
-InputName=Reactor
-
-BuildCmds= \
- ..\..\TAO_IDL\tao_idl $(InputName).idl
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "server - Win32 Debug"
-
-# Begin Custom Build
-InputPath=.\Reactor.idl
-InputName=Reactor
-
-BuildCmds= \
- ..\..\TAO_IDL\tao_idl $(InputName).idl
-
-"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\reactor_i.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\ReactorC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\ReactorS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\server.cpp
-# End Source File
-# End Target
-# End Project
diff --git a/TAO/tests/NestedUpcall/svc.conf b/TAO/tests/NestedUpcall/svc.conf deleted file mode 100644 index 43c6a486c92..00000000000 --- a/TAO/tests/NestedUpcall/svc.conf +++ /dev/null @@ -1,49 +0,0 @@ -# $Id$ -# -# This file contains a sample ACE_Service_Config configuration -# file specifying the strategy factories utilized by an application -# using TAO. There are currently only two possible factories: -# Client_Strategy_Factory and Server_Strategy_Factory. These names -# must be used as the second argument to their corresponding line, -# because that's what the ORB uses to find the desired factory. -# -# Note that there are two unordinary characteristics of the way *this* -# file is set up: -# - both client and server strategies are specified in the same -# file, which would only make sense for co-located clients & servers -# - both of the factories are actually sourced out of libTAO.so -# (TAO.DLL on Win32), and they would normally be in a separate -# dll from the TAO ORB Core. -# -# The options which can be passed to the Resource Factory are: -# -# -ORBresources <which> -# where <which> can be 'global' to specify globally-held resources, -# or 'tss' to specify thread-specific resources. -# -# The options which can be passed to the Client are: -# <none currently> -# -# The options which can be passed to the Server are: -# -# -ORBconcurrency <which> -# where <which> can be 'thread-per-connection' to specify -# use of the ACE_Threaded_Strategy concurrency strategy, -# or 'reactive' to specify use of the ACE_Reactive_Strategy -# concurrency strategy. -# -# -ORBthreadflags <flags> -# specifies the default thread flags to use, where <flags> is a -# logical OR'ing of the flags THR_DETACHED, THR_BOUND, THR_NEW_LWP, -# THR_SUSPENDED, or THR_DAEMON. Note that not every flag may be valid -# on every platform. -# -# -ORBdemuxstrategy <which> -# where <which> can be one of 'dynamic', 'linear', 'active', or 'user', -# and specifies the type of object lookup strategy used internally. -# -ORBtablesize <unsigned> -# specifies the size of the object table -# -dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() "-ORBresources global" -dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory() -dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency reactive -ORBdemuxstrategy dynamic -ORBtablesize 128" |