summaryrefslogtreecommitdiff
path: root/TAO/tests/Quoter
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/Quoter')
-rw-r--r--TAO/tests/Quoter/Quoter.dsp83
-rw-r--r--TAO/tests/Quoter/Quoter.dsw41
-rw-r--r--TAO/tests/Quoter/quoter.idl24
-rw-r--r--TAO/tests/Quoter/quoter_client.cpp259
-rw-r--r--TAO/tests/Quoter/quoter_client.dsp166
-rw-r--r--TAO/tests/Quoter/quoter_client.h88
-rw-r--r--TAO/tests/Quoter/quoter_impl.cpp75
-rw-r--r--TAO/tests/Quoter/quoter_impl.h74
-rw-r--r--TAO/tests/Quoter/quoter_server.cpp209
-rw-r--r--TAO/tests/Quoter/quoter_server.dsp178
-rw-r--r--TAO/tests/Quoter/quoter_server.h97
-rw-r--r--TAO/tests/Quoter/svc.conf49
12 files changed, 0 insertions, 1343 deletions
diff --git a/TAO/tests/Quoter/Quoter.dsp b/TAO/tests/Quoter/Quoter.dsp
deleted file mode 100644
index a602edbd586..00000000000
--- a/TAO/tests/Quoter/Quoter.dsp
+++ /dev/null
@@ -1,83 +0,0 @@
-# Microsoft Developer Studio Project File - Name="Quoter" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=Quoter - 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 "Quoter.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 "Quoter.mak" CFG="Quoter - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Quoter - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "Quoter - 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)" == "Quoter - 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 "Release"
-# 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 /W3 /GX /O2 /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 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
-
-!ELSEIF "$(CFG)" == "Quoter - 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 "Debug"
-# 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 /W3 /Gm /GX /Zi /Od /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 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
-
-!ENDIF
-
-# Begin Target
-
-# Name "Quoter - Win32 Release"
-# Name "Quoter - Win32 Debug"
-# End Target
-# End Project
diff --git a/TAO/tests/Quoter/Quoter.dsw b/TAO/tests/Quoter/Quoter.dsw
deleted file mode 100644
index 5e79dac7540..00000000000
--- a/TAO/tests/Quoter/Quoter.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: "quoter_client"=.\quoter_client.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "quoter_server"=.\quoter_server.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/TAO/tests/Quoter/quoter.idl b/TAO/tests/Quoter/quoter.idl
deleted file mode 100644
index 33cc8847fdd..00000000000
--- a/TAO/tests/Quoter/quoter.idl
+++ /dev/null
@@ -1,24 +0,0 @@
-// $Id$
-
-module Stock
-{
- exception Invalid_Stock {};
- exception Invalid_Quoter {};
-
- interface Quoter
- {
- // Returns the current stock value or throws and exception
- long get_quote (in string stock_name) raises (Invalid_Stock, Invalid_Quoter);
-
- // Destroy a Quoter session and release resources.
- void destroy ();
- };
-
- // Manage the lifecycle of a Quoter object.
- interface Quoter_Factory
- {
- // Returns a new Quoter selected by name
- // e.g., "Dow Jones," "Reuters,", etc
- Quoter create_quoter (in string name) raises (Invalid_Quoter);
- };
-};
diff --git a/TAO/tests/Quoter/quoter_client.cpp b/TAO/tests/Quoter/quoter_client.cpp
deleted file mode 100644
index 5be76d0dce4..00000000000
--- a/TAO/tests/Quoter/quoter_client.cpp
+++ /dev/null
@@ -1,259 +0,0 @@
-// $Id$
-
-//#include "ace/Profile_Timer.h"
-//#include "ace/Env_Value_T.h"
-#include "ace/Read_Buffer.h"
-#include "quoter_client.h"
-#include "orbsvcs/CosNamingC.h"
-
-// Constructor.
-Quoter_Client::Quoter_Client (void)
- : quoter_factory_key_ (0),
- quoter_key_ (ACE_OS::strdup ("key0")),
- shutdown_ (0),
- quoter_ (Stock::Quoter::_nil ()),
- quoter_factory_ior_file_ (0),
- f_handle_ (ACE_INVALID_HANDLE),
- use_naming_service_ (1)
-{
-}
-
-// Reads the Quoter factory ior from a file
-
-int
-Quoter_Client::read_ior (char *filename)
-{
- // Open the file for reading.
- this->f_handle_ = ACE_OS::open (filename,0);
-
- if (this->f_handle_ == ACE_INVALID_HANDLE)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to open %s for writing: %p\n",
- filename),
- -1);
- ACE_Read_Buffer ior_buffer (this->f_handle_);
- this->quoter_factory_key_ = ior_buffer.read ();
-
- if (this->quoter_factory_key_ == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to allocate memory to read ior: %p\n"),
- -1);
- return 0;
-}
-
-// Parses the command line arguments and returns an error status.
-
-int
-Quoter_Client::parse_args (void)
-{
- ACE_Get_Opt get_opts (argc_, argv_, "dn:f:k:xs");
- int c;
- int result;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'd': // debug flag
- TAO_debug_level++;
- break;
- case 'f': // read the IOR from the file.
- result = this->read_ior (get_opts.optarg);
- if (result < 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to read ior from %s : %p\n",
- get_opts.optarg),
- -1);
- break;
- case 'k': // read the quoter IOR from the command-line.
- this->quoter_factory_key_ =
- ACE_OS::strdup (get_opts.optarg);
- break;
- case 'x':
- this->shutdown_ = 1;
- break;
- case 's': // Don't use the TAO Naming Service.
- this->use_naming_service_ = 0;
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s"
- " [-d]"
- " [-f quoter_factory-obj-ref-key-file]"
- " [-k quoter-obj-ref-key]"
- " [-x]"
- " [-s]"
- "\n",
- this->argv_ [0]),
- -1);
- }
-
- // Indicates successful parsing of command line.
- return 0;
-}
-
-int
-Quoter_Client::run (void)
-{
- CORBA::Long q = this->quoter_->get_quote ("ACE Hardware", this->env_);
- if (this->env_.exception () != 0)
- {
- this->env_.print_exception ("with get_quote");
- return -1;
- }
- else
- {
- ACE_DEBUG ((LM_DEBUG, "ACE Hardware = %i\n", q));
- return q;
- }
-}
-
-Quoter_Client::~Quoter_Client (void)
-{
- // Free resources
- // Close the ior files
- if (this->quoter_factory_ior_file_)
- ACE_OS::fclose (this->quoter_factory_ior_file_);
- if (this->f_handle_ != ACE_INVALID_HANDLE)
- ACE_OS::close (this->f_handle_);
-
- CORBA::release (this->quoter_);
-
- if (this->quoter_factory_key_ != 0)
- ACE_OS::free (this->quoter_factory_key_);
- if (this->quoter_key_ != 0)
- ACE_OS::free (this->quoter_key_);
-}
-
-int
-Quoter_Client::init_naming_service (void)
-{
- TAO_TRY
- {
- CORBA::Object_var naming_obj =
- this->orb_->resolve_initial_references ("NameService");
- if (CORBA::is_nil (naming_obj.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to resolve the Name Service.\n"),
- -1);
- CosNaming::NamingContext_var naming_context =
- CosNaming::NamingContext::_narrow (naming_obj.in (),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- CosNaming::Name quoter_factory_name (2);
- quoter_factory_name.length (2);
- quoter_factory_name[0].id = CORBA::string_dup ("IDL_Quoter");
- quoter_factory_name[1].id = CORBA::string_dup ("quoter_factory");
- CORBA::Object_var factory_obj =
- naming_context->resolve (quoter_factory_name,TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- this->factory_ =
- Stock::Quoter_Factory::_narrow (factory_obj.in (),TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- if (CORBA::is_nil (this->factory_.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " could not resolve quoter factory in Naming service <%s>\n"),
- -1);
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("Quoter::init_naming_service");
- return -1;
- }
- TAO_ENDTRY;
-
- return 0;
-}
-
-int
-Quoter_Client::init (int argc, char **argv)
-{
- int naming_result;
- this->argc_ = argc;
- this->argv_ = argv;
-
- TAO_TRY
- {
- // Retrieve the ORB.
- this->orb_ = CORBA::ORB_init (this->argc_,
- this->argv_,
- "internet",
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Parse command line and verify parameters.
- if (this->parse_args () == -1)
- return -1;
-
- if (this->use_naming_service_)
- {
- naming_result = this->init_naming_service ();
- if (naming_result < 0)
- return naming_result;
- }
- else
- {
- if (this->quoter_factory_key_ == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%s: no quoter factory key specified\n",
- this->argv_[0]),
- -1);
-
-
- CORBA::Object_var factory_object =
- this->orb_->string_to_object (this->quoter_factory_key_,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- this->factory_ =
- Stock::Quoter_Factory::_narrow (factory_object.in(), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- if (CORBA::is_nil (this->factory_.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- "invalid factory key <%s>\n",
- this->quoter_factory_key_),
- -1);
- }
-
- ACE_DEBUG ((LM_DEBUG, "Factory received OK\n"));
-
- // Now retrieve the Quoter obj ref corresponding to the key.
- this->quoter_ =
- this->factory_->create_quoter (this->quoter_key_,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- if (CORBA::is_nil (this->quoter_))
- ACE_ERROR_RETURN ((LM_ERROR,
- "null quoter objref returned by factory\n"),
- -1);
- }
- TAO_CATCHANY
- {
- TAO_TRY_ENV.print_exception ("Quoter::init");
- return -1;
- }
- TAO_ENDTRY;
-
- return 0;
-}
-
-// This function runs the test.
-
-int
-main (int argc, char **argv)
-{
- Quoter_Client quoter_client;
-
- ACE_DEBUG ((LM_DEBUG,"\n \t IDL_Quoter: client \n\n"));
-
- if (quoter_client.init (argc, argv) == -1)
- return 1;
- else
- return quoter_client.run ();
-}
-
diff --git a/TAO/tests/Quoter/quoter_client.dsp b/TAO/tests/Quoter/quoter_client.dsp
deleted file mode 100644
index 50508e708e9..00000000000
--- a/TAO/tests/Quoter/quoter_client.dsp
+++ /dev/null
@@ -1,166 +0,0 @@
-# Microsoft Developer Studio Project File - Name="quoter_client" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=quoter_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 "quoter_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 "quoter_client.mak" CFG="quoter_client - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "quoter_client - Win32 Release" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "quoter_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)" == "quoter_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 "Release"
-# 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 /W3 /GX /O2 /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 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
-
-!ELSEIF "$(CFG)" == "quoter_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 "..\..\\" /I "..\..\orbsvcs" /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 orbsvcs.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\ace" /libpath:"..\..\tao" /libpath:"..\..\orbsvcs\orbsvcs"
-
-!ENDIF
-
-# Begin Target
-
-# Name "quoter_client - Win32 Release"
-# Name "quoter_client - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;idl"
-# Begin Source File
-
-SOURCE=.\quoter.idl
-
-!IF "$(CFG)" == "quoter_client - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quoter_client - Win32 Debug"
-
-# Begin Custom Build
-InputPath=.\quoter.idl
-
-BuildCmds= \
- ..\..\tao_idl\tao_idl quoter.idl
-
-"quoterC.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"quoterC.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"quoterC.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"quoterS.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"quoterS.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"quoterS.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\quoter_client.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\quoterC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\quoterS.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h"
-# Begin Source File
-
-SOURCE=.\quoter_client.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\quoterC.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\quoterS.h
-# End Source File
-# End Group
-# Begin Group "Include Files"
-
-# PROP Default_Filter "i"
-# Begin Source File
-
-SOURCE=.\quoterC.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\quoterS.i
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/TAO/tests/Quoter/quoter_client.h b/TAO/tests/Quoter/quoter_client.h
deleted file mode 100644
index e453ca374ad..00000000000
--- a/TAO/tests/Quoter/quoter_client.h
+++ /dev/null
@@ -1,88 +0,0 @@
-// $Id$
-// -*- C++ -*-
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Quoter
-//
-// = FILENAME
-// quoter_client.h
-//
-// = DESCRIPTION
-// @@@ Write this
-//
-// = AUTHORS
-// Darrell Brunsch
-//
-// ============================================================================
-
-#include "ace/Get_Opt.h"
-#include "tao/corba.h"
-#include "quoterC.h"
-
-class Quoter_Client
-{
- // = TITLE
- // @@@ Write this
- //
- // = DESCRIPTION
- // @@@ Write this
-public:
- // = Constructor and destructor.
- Quoter_Client (void);
- ~Quoter_Client (void);
-
- int run (void);
- // Execute client example code.
-
- int init (int argc, char **argv);
- // Initialize the client communication endpoint with server.
-
-private:
- int init_naming_service (void);
- // Function to initialize the naming service.
-
- int read_ior (char *filename);
- // Function to read the Quoter factory ior from a file.
-
- int parse_args (void);
- // Parses the arguments passed on the command line.
-
- int argc_;
- // # of arguments on the command line.
-
- char **argv_;
- // arguments from command line.
-
- char *quoter_factory_key_;
- // Key of factory obj ref.
-
- char *quoter_key_;
- // Key of the obj ref to be retrieved via the factory.
-
- int shutdown_;
- // Flag to tell server to shutdown.
-
- Stock::Quoter_Factory_var factory_;
- // factory pointer for cubit.
-
- CORBA::Environment env_;
- // Environment variable.
-
- Stock::Quoter_ptr quoter_;
- // Quoter obj ref.
-
- CORBA::ORB_var orb_;
- // Remember our orb.
-
- FILE *quoter_factory_ior_file_;
- // File from which to obtain the IOR.
-
- ACE_HANDLE f_handle_;
- // File handle to read the IOR.
-
- int use_naming_service_;
- // Flag to tell client not to use Namingservice to find the cubit
- // Factory.
-};
diff --git a/TAO/tests/Quoter/quoter_impl.cpp b/TAO/tests/Quoter/quoter_impl.cpp
deleted file mode 100644
index fd93cf30277..00000000000
--- a/TAO/tests/Quoter/quoter_impl.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Quoter
-//
-// = FILENAME
-// quoter_impl.cpp
-//
-// = AUTHOR
-// Darrell Brunsch
-//
-// ============================================================================
-
-#include "tao/corba.h"
-//#include "ace/Auto_Ptr.h"
-#include "quoter_impl.h"
-
-// Constructor
-
-Quoter_Factory_Impl::Quoter_Factory_Impl (void)
-{
-}
-
-// Destructor
-
-Quoter_Factory_Impl::~Quoter_Factory_Impl (void)
-{
-}
-
-Stock::Quoter_ptr
-Quoter_Factory_Impl::create_quoter (const char *name,
- CORBA::Environment &env)
-{
- ACE_UNUSED_ARG (name);
- return my_quoter_._this (env);
-}
-
-// Constructor
-
-Quoter_Impl::Quoter_Impl (const char *)
-{
-}
-
-// Destructor
-
-Quoter_Impl::~Quoter_Impl (void)
-{
-}
-
-Quoter_Impl::get_quote (char const *stock_name, class CORBA_Environment &env)
-{
- ACE_UNUSED_ARG (stock_name);
- ACE_UNUSED_ARG (env);
-
- return 42;
-}
-
-// Shutdown.
-
-void Quoter_Impl::destroy (CORBA::Environment &env)
-{
- ACE_UNUSED_ARG (env);
-
- ACE_DEBUG ((LM_DEBUG,
- "%s",
- "I have been asked to shut down "));
-
- TAO_ORB_Core_instance ()->orb ()->shutdown ();
-}
-
-
-
-
diff --git a/TAO/tests/Quoter/quoter_impl.h b/TAO/tests/Quoter/quoter_impl.h
deleted file mode 100644
index 6adf9fbcb81..00000000000
--- a/TAO/tests/Quoter/quoter_impl.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Quoter
-//
-// = FILENAME
-// quoter_impl.h
-//
-// = AUTHOR
-// Darrell Brunsch
-//
-// ============================================================================
-
-#if !defined (QUOTER_IMPL_H)
-#define QUOTER_IMPL_H
-
-#include "QuoterS.h"
-
-// Forward declarations.
-class Quoter_Impl;
-
-// Typedefs.
-typedef Quoter_Impl *Quoter_Impl_ptr;
-typedef Quoter_Impl_ptr Quoter_Impl_ref;
-
-class Quoter_Impl: public POA_Stock::Quoter
-{
- // = TITLE
- // @@@@ Write
- //
- // = DESCRIPTION
- // @@@@ Write
-public:
- Quoter_Impl (const char *obj_name = 0);
- // Constructor
-
- ~Quoter_Impl (void);
- // Destructor
-
- virtual CORBA::Long get_quote (const char *stock_name,
- CORBA::Environment &env);
-
- virtual void destroy (CORBA_Environment &env);
-};
-
-class Quoter_Factory_Impl;
-
-typedef Quoter_Factory_Impl *Quoter_Factory_Impl_ptr;
-
-class Quoter_Factory_Impl: public POA_Stock::Quoter_Factory
-{
- // = TITLE
- // Quoter_Factory_Impl
- //
- // = DESCRIPTION
- // Factory object returning the quoter_impl objrefs
-public:
- Quoter_Factory_Impl (void);
- // Constructor.
-
- ~Quoter_Factory_Impl (void);
- // Destructor.
-
- virtual Stock::Quoter_ptr create_quoter (const char *name,
- CORBA::Environment &env);
- // Return the quoter by the id <name>
-
-private:
- Quoter_Impl my_quoter_;
-};
-
-#endif /* QUOTER_IMPL_H */
diff --git a/TAO/tests/Quoter/quoter_server.cpp b/TAO/tests/Quoter/quoter_server.cpp
deleted file mode 100644
index 31f57361ca6..00000000000
--- a/TAO/tests/Quoter/quoter_server.cpp
+++ /dev/null
@@ -1,209 +0,0 @@
-// $Id$
-
-#include "quoter_server.h"
-
-Quoter_Server::Quoter_Server (void)
- :num_of_objs_ (1),
- use_naming_service_ (1),
- ior_output_file_ (0)
-{
-}
-
-int
-Quoter_Server::parse_args (void)
-{
- ACE_Get_Opt get_opts (argc_, argv_, "dn:o:s");
- int c;
-
- while ((c = get_opts ()) != -1)
- switch (c)
- {
- case 'd': // debug flag.
- TAO_debug_level++;
- break;
- case 'n': // number of Quoter objects we export
- this->num_of_objs_ = ACE_OS::atoi (get_opts.optarg);
- break;
- case 'o': // output the IOR to a file.
- this->ior_output_file_ = ACE_OS::fopen (get_opts.optarg, "w");
- if (this->ior_output_file_ == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Unable to open %s for writing: %p\n",
- get_opts.optarg), -1);
- break;
- case 's': // Don't use the TAO Naming Service.
- this->use_naming_service_=0;
- break;
- case '?':
- default:
- ACE_ERROR_RETURN ((LM_ERROR,
- "usage: %s"
- " [-d]"
- " [-n] <num of Quoter objects>"
- " [-o] <ior_output_file>"
- " [-s]"
- "\n",
- argv_ [0]),
- 1);
- }
-
- // Indicates successful parsing of command line.
- return 0;
-}
-
-int
-Quoter_Server::init (int argc,
- char** argv,
- CORBA::Environment& env)
-{
- // Call the init of TAO_ORB_Manager to create a child POA
- // under the root POA.
- this->init_child_poa (argc,
- argv,
- "child_poa",
- env);
-
- TAO_CHECK_ENV_RETURN (env,-1);
- this->argc_ = argc;
- this->argv_ = argv;
-
- this->parse_args ();
-
- CORBA::String_var str =
- this->activate_under_child_poa ("factory",
- &this->factory_impl_,
- env);
- ACE_DEBUG ((LM_DEBUG,
- "The IOR is: <%s>\n",
- str.in ()));
-
- if (this->ior_output_file_)
- {
- ACE_OS::fprintf (this->ior_output_file_,
- "%s",
- str.in ());
- ACE_OS::fclose (this->ior_output_file_);
- }
-
- if (this->use_naming_service_)
- return this->init_naming_service (env);
-
- return 0;
-}
-
-// Initialisation of Naming Service and register IDL_Quoter Context and
-// Quoter_factory object.
-
-int
-Quoter_Server::init_naming_service (CORBA::Environment& env)
-{
- int result;
- result = this->my_name_server_.init (this->orb_,
- this->child_poa_);
- if (result < 0)
- return result;
- factory = this->factory_impl_._this (env);
- TAO_CHECK_ENV_RETURN (env,-1);
-
- CosNaming::Name quoter_context_name (1);
- quoter_context_name.length (1);
- quoter_context_name[0].id = CORBA::string_dup ("IDL_Quoter");
- this->quoter_context_ =
- this->my_name_server_->bind_new_context (quoter_context_name,
- env);
- TAO_CHECK_ENV_RETURN (env,-1);
-
- //Register the quoter_factory name with the IDL_quoter Naming
- //Context...
- CosNaming::Name factory_name (1);
- factory_name.length (1);
- factory_name[0].id = CORBA::string_dup ("quoter_factory");
- this->quoter_context_->bind (factory_name,
- factory.in (),
- env);
- TAO_CHECK_ENV_RETURN (env,-1);
- return 0;
-}
-
-int
-Quoter_Server::run (CORBA::Environment& env)
-{
- this->poa_manager_->activate (env);
- TAO_CHECK_ENV_RETURN (env,1);
-
- if (this->orb_->run () == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "run"),
- -1);
- return 0;
-}
-
-Quoter_Server::~Quoter_Server (void)
-{
- TAO_TRY
- {
- // Unbind quoter factory context and name.
- CosNaming::Name factory_name (2);
- factory_name.length (2);
- factory_name[0].id = CORBA::string_dup ("IDL_Quoter");
- factory_name[1].id = CORBA::string_dup ("quoter_factory");
- // this->naming_context_->unbind (factory_name,TAO_TRY_ENV);
- this->my_name_server_->unbind (factory_name,TAO_TRY_ENV);
- TAO_CHECK_ENV;
- factory_name.length (1);
- // this->naming_context_->unbind
- // (factory_name,TAO_TRY_ENV);
- this->my_name_server_->unbind (factory_name,TAO_TRY_ENV);
- TAO_CHECK_ENV;
- // Destroy all the POAs.
- this->root_poa_->destroy (CORBA::B_TRUE,
- CORBA::B_TRUE,
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- TAO_CATCH (CORBA::SystemException, sysex)
- {
- ACE_UNUSED_ARG (sysex);
- TAO_TRY_ENV.print_exception ("System Exception");
- }
- TAO_CATCH (CORBA::UserException, userex)
- {
- ACE_UNUSED_ARG (userex);
- TAO_TRY_ENV.print_exception ("User Exception");
- }
- TAO_ENDTRY;
-}
-
-int
-main (int argc, char *argv[])
-{
- Quoter_Server quoter_server;
-
- ACE_DEBUG ((LM_DEBUG,
- "\n \t IDL_Quoter:SERVER \n \n"));
- TAO_TRY
- {
- if (quoter_server.init (argc,argv,TAO_TRY_ENV) == -1)
- return 1;
- else
- {
- quoter_server.run (TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- }
- TAO_CATCH (CORBA::SystemException, sysex)
- {
- ACE_UNUSED_ARG (sysex);
- TAO_TRY_ENV.print_exception ("System Exception");
- return -1;
- }
- TAO_CATCH (CORBA::UserException, userex)
- {
- ACE_UNUSED_ARG (userex);
- TAO_TRY_ENV.print_exception ("User Exception");
- return -1;
- }
- TAO_ENDTRY;
- return 0;
-}
diff --git a/TAO/tests/Quoter/quoter_server.dsp b/TAO/tests/Quoter/quoter_server.dsp
deleted file mode 100644
index 1470fac000f..00000000000
--- a/TAO/tests/Quoter/quoter_server.dsp
+++ /dev/null
@@ -1,178 +0,0 @@
-# Microsoft Developer Studio Project File - Name="quoter_server" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 5.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=quoter_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 "quoter_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 "quoter_server.mak" CFG="quoter_server - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "quoter_server - Win32 Release" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "quoter_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)" == "quoter_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 "Release"
-# 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 /W3 /GX /O2 /I "..\..\..\\" /I "..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
-# SUBTRACT CPP /YX
-# 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 ace.lib tao.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\ace" /libpath:"..\..\tao"
-
-!ELSEIF "$(CFG)" == "quoter_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 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 "..\..\\" /I "..\..\orbsvcs" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
-# SUBTRACT CPP /YX
-# 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 aced.lib tao.lib orbsvcs.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\ace" /libpath:"..\..\tao" /libpath:"..\..\orbsvcs\orbsvcs"
-# SUBTRACT LINK32 /nodefaultlib
-
-!ENDIF
-
-# Begin Target
-
-# Name "quoter_server - Win32 Release"
-# Name "quoter_server - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;idl"
-# Begin Source File
-
-SOURCE=.\quoter.idl
-
-!IF "$(CFG)" == "quoter_server - Win32 Release"
-
-!ELSEIF "$(CFG)" == "quoter_server - Win32 Debug"
-
-# Begin Custom Build - Compiling IDL
-InputPath=.\quoter.idl
-
-BuildCmds= \
- ..\..\tao_idl\tao_idl quoter.idl
-
-"quoterC.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"quoterC.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"quoterC.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"quoterS.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"quoterS.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-
-"quoterS.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- $(BuildCmds)
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\quoter_impl.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\quoter_server.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\quoterC.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\quoterS.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h"
-# Begin Source File
-
-SOURCE=.\quoter_impl.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\quoter_server.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\quoterC.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\quoterS.h
-# End Source File
-# End Group
-# Begin Group "Include Files"
-
-# PROP Default_Filter "i"
-# Begin Source File
-
-SOURCE=.\quoterC.i
-# End Source File
-# Begin Source File
-
-SOURCE=.\quoterS.i
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/TAO/tests/Quoter/quoter_server.h b/TAO/tests/Quoter/quoter_server.h
deleted file mode 100644
index 242f881b063..00000000000
--- a/TAO/tests/Quoter/quoter_server.h
+++ /dev/null
@@ -1,97 +0,0 @@
-// $Id$
-// -*- C++ -*-
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO/tests/Quoter
-//
-// = FILENAME
-// quoter_server.h
-//
-// = DESCRIPTION
-// @@@ Working on it
-//
-// = AUTHORS
-// Darrell Brunsch
-//
-// ============================================================================
-
-#if !defined (QUOTER_SERVER_H)
-#define QUOTER_SERVER_H
-
-#include "ace/Get_Opt.h"
-#include "ace/Log_Msg.h"
-#include "orbsvcs/CosNamingC.h"
-#include "quoter_impl.h"
-#include "quoterC.h"
-#include "orbsvcs/Naming/Naming_Utils.h"
-#include "tao/tao_util.h"
-
-
-class Quoter_Server : public TAO_ORB_Manager
-{
- // =TITLE
- // Defines a Quoter Server class that implements the functionality
- // of a server process as an object.
- //
- // =DESCRIPTION
- // The interface is quite simple. A server program has to call
- // init to initialize the quoter_server's state and then call run
- // to run the orb.
-public:
-
- Quoter_Server (void);
- // Default constructor
-
- ~Quoter_Server (void);
- // Destructor
-
- int init (int argc, char **argv, CORBA::Environment& env);
- // Initialize the Quoter_Server state - parsing arguments and ...
-
- int run (CORBA::Environment& env);
- // Run the orb
-
-private:
- int parse_args (void);
- // Parses the commandline arguments.
-
- int init_naming_service (CORBA::Environment &env);
- // Initialises the name server and registers cubit factory with the
- // name server.
-
- int num_of_objs_;
- // Number of cubit objects we export.
-
- int use_naming_service_;
- //Flag to tell server not to use the TAO Naming Service to register
- //the cubit factory.
-
- FILE* ior_output_file_;
- // File to output the cubit factory IOR.
-
- TAO_Naming_Server my_name_server_;
- // An instance of the name server used for registering the factory
- // objects.
-
- Quoter_Factory_Impl factory_impl_;
- // Implementation object of the cubit factory.
-
- Stock::Quoter_Factory_var factory;
- // Factory_var to register with NamingService.
-
- CosNaming::NamingContext_var quoter_context_;
- // Naming context for the cubit_factory.
-
- CosNaming::NamingContext_var naming_context_;
- // Naming context for the Naming Service.
-
- int argc_;
- // Number of commandline arguments.
-
- char **argv_;
- // commandline arguments.
-};
-
-#endif /* QUOTER_SERVER_H */
diff --git a/TAO/tests/Quoter/svc.conf b/TAO/tests/Quoter/svc.conf
deleted file mode 100644
index 43c6a486c92..00000000000
--- a/TAO/tests/Quoter/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"