summaryrefslogtreecommitdiff
path: root/TAO/CIAO/tests
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/CIAO/tests')
-rw-r--r--TAO/CIAO/tests/temp/README3
-rw-r--r--TAO/CIAO/tests/temp/assembly/README4
-rw-r--r--TAO/CIAO/tests/temp/assembly/assembly.dsw98
-rw-r--r--TAO/CIAO/tests/temp/assembly/client.cpp120
-rw-r--r--TAO/CIAO/tests/temp/assembly/client.dsp180
-rw-r--r--TAO/CIAO/tests/temp/assembly/control.idl13
-rw-r--r--TAO/CIAO/tests/temp/assembly/control.mpc18
-rw-r--r--TAO/CIAO/tests/temp/assembly/run_test.pl42
-rw-r--r--TAO/CIAO/tests/temp/assembly/server.cpp169
-rw-r--r--TAO/CIAO/tests/temp/assembly/server.dsp192
10 files changed, 839 insertions, 0 deletions
diff --git a/TAO/CIAO/tests/temp/README b/TAO/CIAO/tests/temp/README
new file mode 100644
index 00000000000..ce3d69a5557
--- /dev/null
+++ b/TAO/CIAO/tests/temp/README
@@ -0,0 +1,3 @@
+This directory contains some simple test programs to verify correct
+operations of CIAO interal modules. We will most likely remove the
+whole subdirectory in the future.
diff --git a/TAO/CIAO/tests/temp/assembly/README b/TAO/CIAO/tests/temp/assembly/README
new file mode 100644
index 00000000000..4dcb5f638e7
--- /dev/null
+++ b/TAO/CIAO/tests/temp/assembly/README
@@ -0,0 +1,4 @@
+The purpose of this test is to ensure the proper functionality of
+Map_Key_Cookie, CIAO's internal Cookie implementation, using
+::Components::Deployment::AssemblyFactory and
+::Components::Deployment::Assembly interfaces.
diff --git a/TAO/CIAO/tests/temp/assembly/assembly.dsw b/TAO/CIAO/tests/temp/assembly/assembly.dsw
new file mode 100644
index 00000000000..2b42646ed51
--- /dev/null
+++ b/TAO/CIAO/tests/temp/assembly/assembly.dsw
@@ -0,0 +1,98 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "server EXE"=server.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name PortableServer DLL
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name tao DLL
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name TAO_IDL_EXE EXE
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name ace DLL
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name CIAO_Server DLL
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name CIAO_Container DLL
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name CIAO_Client DLL
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name TAO_IDL_EXE EXE
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name tao DLL
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name ace DLL
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "client EXE"=client.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name tao DLL
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name TAO_IDL_EXE EXE
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name ace DLL
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name CIAO_Server DLL
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name CIAO_Container DLL
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name CIAO_Client DLL
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name TAO_IDL_EXE EXE
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name tao DLL
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name ace DLL
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/TAO/CIAO/tests/temp/assembly/client.cpp b/TAO/CIAO/tests/temp/assembly/client.cpp
new file mode 100644
index 00000000000..078e743ea79
--- /dev/null
+++ b/TAO/CIAO/tests/temp/assembly/client.cpp
@@ -0,0 +1,120 @@
+// $Id$
+
+#include "controlC.h"
+#include "Client_init.h"
+#include "ace/Get_Opt.h"
+
+ACE_RCSID(Hello, client, "$Id$")
+
+const char *ior = "file://test.ior";
+
+int
+parse_args (int argc, char *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, "k:");
+ int c;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 'k':
+ ior = get_opts.opt_arg ();
+ break;
+
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s "
+ "-k <ior> "
+ "\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;
+
+ CIAO::Client_init (orb.in ());
+
+ CORBA::Object_var tmp =
+ orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ ATest::controller_var ctrlr =
+ ATest::controller::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (CORBA::is_nil (ctrlr.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_DEBUG,
+ "Nil Test::Hello reference <%s>\n",
+ ior),
+ 1);
+ }
+
+ ::Components::Deployment::AssemblyFactory_var fac
+ = ctrlr->get_factory (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ ::Components::Cookie_var ck1 = fac->create_assembly ("test1"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ ::Components::Cookie_var ck2 = fac->create_assembly ("test2"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ ::Components::Deployment::Assembly_var asb1
+ = fac->lookup (ck1.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ ::Components::Deployment::Assembly_var asb2
+ = fac->lookup (ck2.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ asb1->build (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ asb1->tear_down (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ fac->destroy (ck1.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ asb2->build (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ // This should tear down assembly2 first.
+ fac->destroy (ck2.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ ctrlr->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/CIAO/tests/temp/assembly/client.dsp b/TAO/CIAO/tests/temp/assembly/client.dsp
new file mode 100644
index 00000000000..ffb847a6ad7
--- /dev/null
+++ b/TAO/CIAO/tests/temp/assembly/client.dsp
@@ -0,0 +1,180 @@
+# Microsoft Developer Studio Project File - Name="client EXE" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=client EXE - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE run the tool that generated this project file and specify the
+!MESSAGE nmake output type. You can then use the following command:
+!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 EXE - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "client EXE - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "client EXE - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "client EXE - Win32 Release"
+
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD CPP /nologo /W3 /GX /O2 /MD /GR /I "..\..\..\..\orbsvcs\orbsvcs" /I "..\..\..\..\CIAO" /I "..\..\..\..\CIAO\ciao" /I "..\..\..\.." /I "..\..\..\..\tao" /I "..\..\..\..\.." /D NDEBUG=1 /D WIN32=1 /D _CONSOLE=1 /FD /c
+# SUBTRACT CPP /YX
+# ADD RSC /l 0x409 /d NDEBUG=1 /i "..\..\..\..\orbsvcs\orbsvcs" /i "..\..\..\..\CIAO" /i "..\..\..\..\CIAO\ciao" /i "..\..\..\.." /i "..\..\..\..\tao" /i "..\..\..\..\.."
+BSC32=bscmake.exe
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD LINK32 advapi32.lib user32.lib /INCREMENTAL:NO CIAO_Server.lib TAO_PortableServer.lib TAO_Security.lib CIAO_Container.lib TAO.lib TAO_IFR_Client.lib CIAO_Client.lib ACE.lib /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\orbsvcs\orbsvcs" /libpath:"..\..\..\..\tao\IFR_Client" /libpath:"..\..\..\..\CIAO\ciao" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\..\ace" /nologo /version:1.3 /subsystem:console /machine:I386 /out:"client.exe"
+
+!ELSEIF "$(CFG)" == "client EXE - Win32 Debug"
+
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /MDd /GR /Gy /I "..\..\..\..\orbsvcs\orbsvcs" /I "..\..\..\..\CIAO" /I "..\..\..\..\CIAO\ciao" /I "..\..\..\.." /I "..\..\..\..\tao" /I "..\..\..\..\.." /D _DEBUG=1 /D WIN32=1 /D _CONSOLE=1 /FD /c
+# SUBTRACT CPP /YX
+# ADD RSC /l 0x409 /d _DEBUG=1 /i "..\..\..\..\orbsvcs\orbsvcs" /i "..\..\..\..\CIAO" /i "..\..\..\..\CIAO\ciao" /i "..\..\..\.." /i "..\..\..\..\tao" /i "..\..\..\..\.."
+BSC32=bscmake.exe
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD LINK32 advapi32.lib user32.lib /INCREMENTAL:NO CIAO_Serverd.lib TAO_PortableServerd.lib TAO_Securityd.lib CIAO_Containerd.lib TAOd.lib TAO_IFR_Clientd.lib CIAO_Clientd.lib ACEd.lib /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\orbsvcs\orbsvcs" /libpath:"..\..\..\..\tao\IFR_Client" /libpath:"..\..\..\..\CIAO\ciao" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\..\ace" /nologo /version:1.3 /subsystem:console /debug /machine:I386 /out:"client.exe"
+
+!ENDIF
+
+# Begin Target
+
+# Name "client EXE - Win32 Release"
+# Name "client EXE - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;cxx;c"
+# Begin Source File
+
+SOURCE=.\client.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\controlC.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hh"
+# Begin Source File
+
+SOURCE=.\controlC.h
+# End Source File
+# End Group
+# Begin Group "Inline Files"
+
+# PROP Default_Filter "i;inl"
+# Begin Source File
+
+SOURCE=.\controlC.i
+# End Source File
+# End Group
+# Begin Group "Documentation"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\README
+# End Source File
+# End Group
+# Begin Group "IDL Files"
+
+# PROP Default_Filter "idl"
+# Begin Source File
+
+SOURCE=.\control.idl
+
+!IF "$(CFG)" == "client EXE - Win32 Release"
+
+# PROP Ignore_Default_Tool 1
+# Begin Custom Build - Invoking TAO_IDL Compiler on $(InputPath)
+InputPath=.\control.idl
+InputName=control
+InputDir=.
+OutDir=.
+
+BuildCmds= \
+ ..\..\..\..\..\bin\tao_idl -o $(OutDir) -I..\..\..\.. -I..\..\..\ciao -I..\..\..\.. -Ge 1 -Sc $(InputPath)
+
+"$(OutDir)\$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "client EXE - Win32 Debug"
+
+# PROP Ignore_Default_Tool 1
+# Begin Custom Build - Invoking TAO_IDL Compiler on $(InputPath)
+InputPath=.\control.idl
+InputName=control
+InputDir=.
+OutDir=.
+
+BuildCmds= \
+ ..\..\..\..\..\bin\tao_idl -o $(OutDir) -I..\..\..\.. -I..\..\..\ciao -I..\..\..\.. -Ge 1 -Sc $(InputPath)
+
+"$(OutDir)\$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/TAO/CIAO/tests/temp/assembly/control.idl b/TAO/CIAO/tests/temp/assembly/control.idl
new file mode 100644
index 00000000000..328d93980c9
--- /dev/null
+++ b/TAO/CIAO/tests/temp/assembly/control.idl
@@ -0,0 +1,13 @@
+// $Id$
+
+#include "CCM_Deployment.idl"
+
+module ATest
+{
+ interface controller
+ {
+ ::Components::Deployment::AssemblyFactory get_factory ();
+
+ oneway void shutdown ();
+ };
+};
diff --git a/TAO/CIAO/tests/temp/assembly/control.mpc b/TAO/CIAO/tests/temp/assembly/control.mpc
new file mode 100644
index 00000000000..2a4caa51b4a
--- /dev/null
+++ b/TAO/CIAO/tests/temp/assembly/control.mpc
@@ -0,0 +1,18 @@
+project : ciao_server, server {
+ idlflags += -I$(TAO_ROOT) -I../../../ciao -I../../../..
+
+ Source_Files {
+ controlS.cpp
+ controlC.cpp
+ server.cpp
+ }
+}
+
+project : ciao_server, client {
+ idlflags += -I$(TAO_ROOT) -I../../../ciao -I../../../..
+
+ Source_Files {
+ controlC.cpp
+ client.cpp
+ }
+} \ No newline at end of file
diff --git a/TAO/CIAO/tests/temp/assembly/run_test.pl b/TAO/CIAO/tests/temp/assembly/run_test.pl
new file mode 100644
index 00000000000..005a06f96a3
--- /dev/null
+++ b/TAO/CIAO/tests/temp/assembly/run_test.pl
@@ -0,0 +1,42 @@
+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;
+
+$iorfile = PerlACE::LocalFile ("server.ior");
+unlink $iorfile;
+$status = 0;
+
+$SV = new PerlACE::Process ("server", "-o $iorfile");
+$CL = new PerlACE::Process ("client", " -k file://$iorfile");
+
+$SV->Spawn ();
+
+if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
+}
+
+$client = $CL->SpawnWaitKill (300);
+
+if ($client != 0) {
+ print STDERR "ERROR: client returned $client\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/CIAO/tests/temp/assembly/server.cpp b/TAO/CIAO/tests/temp/assembly/server.cpp
new file mode 100644
index 00000000000..3bc4079490d
--- /dev/null
+++ b/TAO/CIAO/tests/temp/assembly/server.cpp
@@ -0,0 +1,169 @@
+// $Id$
+
+#include "Assembly_Impl.h"
+#include "Server_init.h"
+#include "ace/Get_Opt.h"
+#include "controlS.h"
+
+class control_impl
+ : public virtual POA_ATest::controller,
+ public virtual PortableServer::RefCountServantBase
+{
+public:
+ control_impl (CORBA::ORB_ptr o,
+ PortableServer::POA_ptr p);
+
+ ::Components::Deployment::AssemblyFactory_ptr
+ get_factory (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ void shutdown (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+protected:
+ CORBA::ORB_var orb_;
+ PortableServer::POA_var poa_;
+};
+
+control_impl::control_impl (CORBA::ORB_ptr o,
+ PortableServer::POA_ptr p)
+ : orb_ (CORBA::ORB::_duplicate (o)),
+ poa_ (PortableServer::POA::_duplicate (p))
+{
+}
+
+::Components::Deployment::AssemblyFactory_ptr
+control_impl::get_factory (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ CIAO::AssemblyFactory_Impl *afactory_impl;
+ ACE_NEW_RETURN (afactory_impl,
+ CIAO::AssemblyFactory_Impl (this->orb_.in (),
+ this->poa_.in ()),
+ 0);
+
+ PortableServer::ServantBase_var owner_transfer(afactory_impl);
+
+ ::Components::Deployment::AssemblyFactory_var fac =
+ afactory_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (0);
+
+ return fac._retn ();
+}
+
+void
+control_impl::shutdown (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
+}
+
+const char *ior_output_file = "test.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[])
+{
+ ACE_TRY_NEW_ENV
+ {
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+
+ CIAO::Server_init (orb.in ());
+
+ CORBA::Object_var poa_object =
+ orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ PortableServer::POA_var root_poa =
+ PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ if (CORBA::is_nil (root_poa.in ()))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ " (%P|%t) Panic: nil RootPOA\n"),
+ 1);
+
+ 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;
+
+ control_impl *c_impl;
+ ACE_NEW_RETURN (c_impl,
+ control_impl (orb.in (),
+ root_poa.in ()),
+ 1);
+ PortableServer::ServantBase_var owner_transfer(c_impl);
+
+ ATest::controller_var ctrlr =
+ c_impl->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ CORBA::String_var ior =
+ orb->object_to_string (ctrlr.in () ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ // Output the IOR to the <ior_output_file>
+ FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ if (output_file == 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Cannot open output file for writing IOR: %s",
+ ior_output_file),
+ 1);
+ ACE_OS::fprintf (output_file, "%s", ior.in ());
+ ACE_OS::fclose (output_file);
+
+ poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
+
+ 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:");
+ return 1;
+ }
+ ACE_ENDTRY;
+
+ return 0;
+}
diff --git a/TAO/CIAO/tests/temp/assembly/server.dsp b/TAO/CIAO/tests/temp/assembly/server.dsp
new file mode 100644
index 00000000000..300990750b2
--- /dev/null
+++ b/TAO/CIAO/tests/temp/assembly/server.dsp
@@ -0,0 +1,192 @@
+# Microsoft Developer Studio Project File - Name="server EXE" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=server EXE - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE run the tool that generated this project file and specify the
+!MESSAGE nmake output type. You can then use the following command:
+!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 EXE - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "server EXE - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "server EXE - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "server EXE - Win32 Release"
+
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD CPP /nologo /W3 /GX /O2 /MD /GR /I "..\..\..\..\orbsvcs\orbsvcs" /I "..\..\..\..\CIAO" /I "..\..\..\..\CIAO\ciao" /I "..\..\..\.." /I "..\..\..\..\tao" /I "..\..\..\..\.." /D NDEBUG=1 /D WIN32=1 /D _CONSOLE=1 /FD /c
+# SUBTRACT CPP /YX
+# ADD RSC /l 0x409 /d NDEBUG=1 /i "..\..\..\..\orbsvcs\orbsvcs" /i "..\..\..\..\CIAO" /i "..\..\..\..\CIAO\ciao" /i "..\..\..\.." /i "..\..\..\..\tao" /i "..\..\..\..\.."
+BSC32=bscmake.exe
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD LINK32 advapi32.lib user32.lib /INCREMENTAL:NO CIAO_Server.lib TAO_PortableServer.lib TAO_Security.lib CIAO_Container.lib TAO.lib TAO_IFR_Client.lib CIAO_Client.lib ACE.lib /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\orbsvcs\orbsvcs" /libpath:"..\..\..\..\tao\IFR_Client" /libpath:"..\..\..\..\CIAO\ciao" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\..\ace" /nologo /version:1.3 /subsystem:console /machine:I386 /out:"server.exe"
+
+!ELSEIF "$(CFG)" == "server EXE - Win32 Debug"
+
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /MDd /GR /Gy /I "..\..\..\..\orbsvcs\orbsvcs" /I "..\..\..\..\CIAO" /I "..\..\..\..\CIAO\ciao" /I "..\..\..\.." /I "..\..\..\..\tao" /I "..\..\..\..\.." /D _DEBUG=1 /D WIN32=1 /D _CONSOLE=1 /FD /c
+# SUBTRACT CPP /YX
+# ADD RSC /l 0x409 /d _DEBUG=1 /i "..\..\..\..\orbsvcs\orbsvcs" /i "..\..\..\..\CIAO" /i "..\..\..\..\CIAO\ciao" /i "..\..\..\.." /i "..\..\..\..\tao" /i "..\..\..\..\.."
+BSC32=bscmake.exe
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD LINK32 advapi32.lib user32.lib /INCREMENTAL:NO CIAO_Serverd.lib TAO_PortableServerd.lib TAO_Securityd.lib CIAO_Containerd.lib TAOd.lib TAO_IFR_Clientd.lib CIAO_Clientd.lib ACEd.lib /libpath:"..\..\..\..\tao\PortableServer" /libpath:"..\..\..\..\orbsvcs\orbsvcs" /libpath:"..\..\..\..\tao\IFR_Client" /libpath:"..\..\..\..\CIAO\ciao" /libpath:"..\..\..\..\tao" /libpath:"..\..\..\..\..\ace" /nologo /version:1.3 /subsystem:console /debug /machine:I386 /out:"server.exe"
+
+!ENDIF
+
+# Begin Target
+
+# Name "server EXE - Win32 Release"
+# Name "server EXE - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;cxx;c"
+# Begin Source File
+
+SOURCE=.\controlC.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\controlS.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\server.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hh"
+# Begin Source File
+
+SOURCE=.\controlC.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\controlS.h
+# End Source File
+# End Group
+# Begin Group "Inline Files"
+
+# PROP Default_Filter "i;inl"
+# Begin Source File
+
+SOURCE=.\controlC.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\controlS.i
+# End Source File
+# End Group
+# Begin Group "Documentation"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\README
+# End Source File
+# End Group
+# Begin Group "IDL Files"
+
+# PROP Default_Filter "idl"
+# Begin Source File
+
+SOURCE=.\control.idl
+
+!IF "$(CFG)" == "server EXE - Win32 Release"
+
+# PROP Ignore_Default_Tool 1
+# Begin Custom Build - Invoking TAO_IDL Compiler on $(InputPath)
+InputPath=.\control.idl
+InputName=control
+InputDir=.
+OutDir=.
+
+BuildCmds= \
+ ..\..\..\..\..\bin\tao_idl -o $(OutDir) -I..\..\..\.. -I..\..\..\ciao -I..\..\..\.. -Ge 1 -Sc $(InputPath)
+
+"$(OutDir)\$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "server EXE - Win32 Debug"
+
+# PROP Ignore_Default_Tool 1
+# Begin Custom Build - Invoking TAO_IDL Compiler on $(InputPath)
+InputPath=.\control.idl
+InputName=control
+InputDir=.
+OutDir=.
+
+BuildCmds= \
+ ..\..\..\..\..\bin\tao_idl -o $(OutDir) -I..\..\..\.. -I..\..\..\ciao -I..\..\..\.. -Ge 1 -Sc $(InputPath)
+
+"$(OutDir)\$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project