diff options
author | mk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-04-15 00:32:51 +0000 |
---|---|---|
committer | mk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-04-15 00:32:51 +0000 |
commit | 082c03a3aeabb96a15facae53ef6821ae1af900c (patch) | |
tree | f256211b061d810426067bcec7b3aa156992aec2 | |
parent | 24772c23f1fed28b0d1b50bd176e238181b86260 (diff) | |
download | ATCD-082c03a3aeabb96a15facae53ef6821ae1af900c.tar.gz |
Tue Apr 14 19:35:50 1998 Michael Kircher <mk1@cs.wustl.edu>
-rw-r--r-- | TAO/ChangeLog-98c | 5 | ||||
-rw-r--r-- | TAO/tests/Quoter/FactoryFinder.dsp | 19 | ||||
-rwxr-xr-x | TAO/tests/Quoter/FactoryFinder.exe | bin | 0 -> 1149 bytes | |||
-rw-r--r-- | TAO/tests/Quoter/FactoryFinderImpl.cpp | 35 | ||||
-rw-r--r-- | TAO/tests/Quoter/client.cpp | 21 | ||||
-rw-r--r-- | TAO/tests/Quoter/client.dsp | 10 | ||||
-rwxr-xr-x | TAO/tests/Quoter/client.exe | bin | 0 -> 463 bytes | |||
-rw-r--r-- | TAO/tests/Quoter/run_test.btm | 2 | ||||
-rw-r--r-- | TAO/tests/Quoter/server.cpp | 3 | ||||
-rw-r--r-- | TAO/tests/Quoter/server.dsp | 2 | ||||
-rwxr-xr-x | TAO/tests/Quoter/server.exe | bin | 0 -> 1248 bytes |
11 files changed, 52 insertions, 45 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c index cae955d4f02..7a58bd0b52e 100644 --- a/TAO/ChangeLog-98c +++ b/TAO/ChangeLog-98c @@ -1,3 +1,8 @@ +Tue Apr 14 19:35:50 1998 Michael Kircher <mk1@cs.wustl.edu> + + * tests/Quoter/*: Quoter example is running using the Cos LifeCycle + Factory Finder. + Tue Apr 14 16:37:50 1998 Carlos O'Ryan <coryan@cs.wustl.edu> * tao/encode.cpp: diff --git a/TAO/tests/Quoter/FactoryFinder.dsp b/TAO/tests/Quoter/FactoryFinder.dsp index 0cc3c2a755b..1bc43ffb456 100644 --- a/TAO/tests/Quoter/FactoryFinder.dsp +++ b/TAO/tests/Quoter/FactoryFinder.dsp @@ -8,13 +8,12 @@ CFG=QuoterFactoryFinder - 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 "QuoterFactoryFinder.mak".
+!MESSAGE NMAKE /f "FactoryFinder.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 "QuoterFactoryFinder.mak"\
- CFG="QuoterFactoryFinder - Win32 Debug"
+!MESSAGE NMAKE /f "FactoryFinder.mak" CFG="QuoterFactoryFinder - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
@@ -89,15 +88,15 @@ LINK32=link.exe # PROP Default_Filter "cpp"
# Begin Source File
-SOURCE=.\QuoterC.cpp
+SOURCE=.\FactoryFinder.cpp
# End Source File
# Begin Source File
-SOURCE=.\QuoterFactoryFinder.cpp
+SOURCE=.\FactoryFinderImpl.cpp
# End Source File
# Begin Source File
-SOURCE=.\QuoterFactoryFinderImpl.cpp
+SOURCE=.\QuoterC.cpp
# End Source File
# Begin Source File
@@ -109,22 +108,22 @@ SOURCE=.\QuoterS.cpp # PROP Default_Filter "h"
# Begin Source File
-SOURCE=.\QuoterC.h
+SOURCE=.\FactoryFinder.h
# End Source File
# Begin Source File
-SOURCE=.\QuoterFactoryFinder.h
+SOURCE=.\FactoryFinderImpl.h
# End Source File
# Begin Source File
-SOURCE=.\QuoterFactoryFinderImpl.h
+SOURCE=.\QuoterC.h
# End Source File
# Begin Source File
SOURCE=.\QuoterS.h
# End Source File
# End Group
-# Begin Group "Include Files"
+# Begin Group "Inline Files"
# PROP Default_Filter "i"
# Begin Source File
diff --git a/TAO/tests/Quoter/FactoryFinder.exe b/TAO/tests/Quoter/FactoryFinder.exe Binary files differnew file mode 100755 index 00000000000..8af3a8e7f8b --- /dev/null +++ b/TAO/tests/Quoter/FactoryFinder.exe diff --git a/TAO/tests/Quoter/FactoryFinderImpl.cpp b/TAO/tests/Quoter/FactoryFinderImpl.cpp index 4a8069fec5a..cfe8a0b24cf 100644 --- a/TAO/tests/Quoter/FactoryFinderImpl.cpp +++ b/TAO/tests/Quoter/FactoryFinderImpl.cpp @@ -17,6 +17,7 @@ #include "ace/Get_Opt.h" #include "tao/corba.h" #include "FactoryFinderImpl.h" +#include "QuoterC.h" static const char usage [] = "[-? |\n[-O[RBport] ORB port number]]"; @@ -61,8 +62,8 @@ QuoterFactoryFinderImpl::find_factories (const CosLifeCycle::Key &factory_key, env_here); // see if there is an exception, if yes then throw the NoFactory exception - if (env_here.exception () != 0) { - // throw a NoFactory exception + if (env_here.exception () != 0) // throw a NoFactory exception + { _env_there.exception (new CosLifeCycle::NoFactory (factory_key)); return 0; } @@ -76,9 +77,8 @@ QuoterFactoryFinderImpl::find_factories (const CosLifeCycle::Key &factory_key, namingContext_var->resolve (quoterContextName, env_here); // see if there is an exception, if yes then throw the NoFactory exception - if (env_here.exception () != 0) { - - // throw a NoFactory exception + if (env_here.exception () != 0) // throw a NoFactory exception + { _env_there.exception (new CosLifeCycle::NoFactory (factory_key)); return 0; } @@ -88,8 +88,8 @@ QuoterFactoryFinderImpl::find_factories (const CosLifeCycle::Key &factory_key, env_here); // see if there is an exception, if yes then throw the NoFactory exception - if (env_here.exception () != 0) { - // throw a NoFactory exception + if (env_here.exception () != 0) // throw a NoFactory exception + { _env_there.exception (new CosLifeCycle::NoFactory (factory_key)); return 0; } @@ -105,22 +105,20 @@ QuoterFactoryFinderImpl::find_factories (const CosLifeCycle::Key &factory_key, quoterNamingContext_var->resolve (factoryName, env_here); // see if there is an exception, if yes then throw the NoFactory exception - if (env_here.exception () != 0) { - - // throw a NoFactory exception + if (env_here.exception () != 0) // throw a NoFactory exception + { _env_there.exception (new CosLifeCycle::NoFactory (factory_key)); return 0; } - // Check if it is a valid Quoter Factory reference - if (CORBA::is_nil (quoterFactoryObject_var.in())) { + // were able to get a reference to Quoter Factory - // throw a NoFactory exception + // Check if it is a valid Quoter Factory reference + if (CORBA::is_nil (quoterFactoryObject_var.in())) + { // throw a NoFactory exception _env_there.exception (new CosLifeCycle::NoFactory (factory_key)); return 0; } - - // were able to get a reference to Quoter Factory else { // create a sequence of factories object @@ -139,15 +137,14 @@ QuoterFactoryFinderImpl::find_factories (const CosLifeCycle::Key &factory_key, factories_ptr->length (1); // Check if it is a valid Quoter Factory reference. - if (CORBA::is_nil (quoterFactoryObject_var.in ())) - { - // throw a NoFactory exception. + if (CORBA::is_nil (quoterFactoryObject_var.in ())) // throw a NoFactory exception. + { _env_there.exception (new CosLifeCycle::NoFactory (factory_key)); return 0; } // insert the object reference - (*factories_ptr)[0] = quoterFactoryObject_var; + (*factories_ptr)[0] = CORBA::Object::_duplicate (quoterFactoryObject_var.ptr()); ACE_DEBUG ((LM_DEBUG,"Have reference to a Quoter Factory.\n")); return factories_ptr; diff --git a/TAO/tests/Quoter/client.cpp b/TAO/tests/Quoter/client.cpp index e783108696a..13565b8276d 100644 --- a/TAO/tests/Quoter/client.cpp +++ b/TAO/tests/Quoter/client.cpp @@ -225,12 +225,23 @@ Quoter_Client::init_naming_service (void) if (factories_ptr == 0) ACE_ERROR_RETURN ((LM_ERROR, - "Did not get a Quoter Factory.\n"), - -1); + "Did not get a Quoter Factory.\n"), + -1); // Get the first object reference to a factory. - CORBA::Object_var quoter_FactoryObj_var = (*factories_ptr)[0]; + CORBA::Object_var quoter_FactoryObj_var; + if (factories_ptr->length () >= 1) + { + // everything is ok, at least one factory is there + quoter_FactoryObj_var = (*factories_ptr)[0]; + } + else + { + ACE_ERROR_RETURN ((LM_ERROR, + "No Factory received.\n"), + -1); + } // Narrow it to a Quoter Factory. factory_var_ = Stock::Quoter_Factory::_narrow (quoter_FactoryObj_var.in (), @@ -240,8 +251,8 @@ Quoter_Client::init_naming_service (void) if (CORBA::is_nil (this->factory_var_.in ())) ACE_ERROR_RETURN ((LM_ERROR, - "Factory received is not valid.\n"), - -1); + "Factory received is not valid.\n"), + -1); ACE_DEBUG ((LM_DEBUG, "Have a proper reference to the Quoter Factory.\n")); } diff --git a/TAO/tests/Quoter/client.dsp b/TAO/tests/Quoter/client.dsp index f0e515e13c8..8b2ecdb723d 100644 --- a/TAO/tests/Quoter/client.dsp +++ b/TAO/tests/Quoter/client.dsp @@ -1,4 +1,4 @@ -# Microsoft Developer Studio Project File - Name="Quoter Client" - Package Owner=<4>
+# Microsoft Developer Studio Project File - Name="client" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 5.00
# ** DO NOT EDIT **
@@ -17,10 +17,8 @@ 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 "client - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "client - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
@@ -114,7 +112,7 @@ SOURCE=.\QuoterC.h SOURCE=.\QuoterS.h
# End Source File
# End Group
-# Begin Group "Include Files"
+# Begin Group "Inline Files"
# PROP Default_Filter "i"
# Begin Source File
diff --git a/TAO/tests/Quoter/client.exe b/TAO/tests/Quoter/client.exe Binary files differnew file mode 100755 index 00000000000..7198e590205 --- /dev/null +++ b/TAO/tests/Quoter/client.exe diff --git a/TAO/tests/Quoter/run_test.btm b/TAO/tests/Quoter/run_test.btm index 904be1b4459..5bc8be1e707 100644 --- a/TAO/tests/Quoter/run_test.btm +++ b/TAO/tests/Quoter/run_test.btm @@ -95,7 +95,7 @@ REM read in the IOR from the file for %%d in (@%nsiorfile) do set ior=%%d REM Start the factory finder -start "Quoter Factory Finder" %leave QuoterFactoryFinder.exe -ORBport %ffport -ORBobjrefstyle url -ORBnameserviceior %ior -ORBsvcconf svc.conf +start "Quoter Factory Finder" %leave FactoryFinder.exe -ORBport %ffport -ORBobjrefstyle url -ORBnameserviceior %ior -ORBsvcconf svc.conf %done diff --git a/TAO/tests/Quoter/server.cpp b/TAO/tests/Quoter/server.cpp index 75e88602fe1..f62ae03c2dd 100644 --- a/TAO/tests/Quoter/server.cpp +++ b/TAO/tests/Quoter/server.cpp @@ -159,9 +159,6 @@ Quoter_Server::init_naming_service (CORBA::Environment& env) int Quoter_Server::run (CORBA::Environment& env) { - //orb_manager_.poa_manager_->activate (env); - // TAO_CHECK_ENV_RETURN (env,1); - if (orb_manager_.orb()->run () == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", diff --git a/TAO/tests/Quoter/server.dsp b/TAO/tests/Quoter/server.dsp index 9e81774e01e..827d5c169b5 100644 --- a/TAO/tests/Quoter/server.dsp +++ b/TAO/tests/Quoter/server.dsp @@ -124,7 +124,7 @@ SOURCE=.\QuoterS.h SOURCE=.\server.h
# End Source File
# End Group
-# Begin Group "Include Files"
+# Begin Group "Inline Files"
# PROP Default_Filter "i"
# Begin Source File
diff --git a/TAO/tests/Quoter/server.exe b/TAO/tests/Quoter/server.exe Binary files differnew file mode 100755 index 00000000000..f0e4815bb36 --- /dev/null +++ b/TAO/tests/Quoter/server.exe |