summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authormk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-11 15:59:11 +0000
committermk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-11 15:59:11 +0000
commit9839b62dbd5ffc1dee9ff977ea7b35ebda5181d0 (patch)
treeb6978b645cb0aad1ad7ed6b3a2ef86c1f8e6793c /TAO
parentd487a68a1629b2bf2514ab614d22b8aecbde83f6 (diff)
downloadATCD-9839b62dbd5ffc1dee9ff977ea7b35ebda5181d0.tar.gz
Introduced the LifeCycle Service object
Diffstat (limited to 'TAO')
-rw-r--r--TAO/tests/Quoter/Criteria_Evaluator.cpp8
-rw-r--r--TAO/tests/Quoter/Criteria_Evaluator.h10
-rw-r--r--TAO/tests/Quoter/Factory_Trader.cpp9
-rw-r--r--TAO/tests/Quoter/Generic_Factory.cpp47
-rw-r--r--TAO/tests/Quoter/Generic_Factory_Impl.h2
-rw-r--r--TAO/tests/Quoter/Life_Cycle_Service.cpp2
-rw-r--r--TAO/tests/Quoter/Life_Cycle_Service.h9
-rw-r--r--TAO/tests/Quoter/Life_Cycle_Service_Impl.cpp110
-rw-r--r--TAO/tests/Quoter/Life_Cycle_Service_Impl.h11
-rw-r--r--TAO/tests/Quoter/Makefile4
-rw-r--r--TAO/tests/Quoter/client.cpp20
-rw-r--r--TAO/tests/Quoter/client.h3
-rwxr-xr-xTAO/tests/Quoter/ss39
13 files changed, 197 insertions, 77 deletions
diff --git a/TAO/tests/Quoter/Criteria_Evaluator.cpp b/TAO/tests/Quoter/Criteria_Evaluator.cpp
index 7f12429071e..4fa2945d9cf 100644
--- a/TAO/tests/Quoter/Criteria_Evaluator.cpp
+++ b/TAO/tests/Quoter/Criteria_Evaluator.cpp
@@ -15,7 +15,7 @@
#include "Criteria_Evaluator.h"
-Quoter_Criteria_Evaluator::Quoter_Criteria_Evaluator (const CosLifeCycle::Criteria criteria)
+Quoter_Criteria_Evaluator::Quoter_Criteria_Evaluator (const CosLifeCycle::Criteria &criteria)
: criteria_ (criteria)
{
}
@@ -72,7 +72,7 @@ Quoter_Criteria_Evaluator::getCriteriaMember (const CORBA::String member_name)
for (unsigned int i = 0; i < criteria_.length(); i++)
{
- if (ACE_OS::strcmp (member_name, criteria_[i].name))
+ if (ACE_OS::strcmp (member_name, criteria_[i].name) == 0)
{
return &(criteria_[i].value);
}
@@ -81,13 +81,13 @@ Quoter_Criteria_Evaluator::getCriteriaMember (const CORBA::String member_name)
}
-
+/*
void
Quoter_Criteria_Evaluator::setCriteria (const CosLifeCycle::Criteria & criteria,
CORBA::Environment &_tao_environment)
{
criteria_ = criteria;
-}
+}*/
diff --git a/TAO/tests/Quoter/Criteria_Evaluator.h b/TAO/tests/Quoter/Criteria_Evaluator.h
index bab4a7938c4..8ec5e346991 100644
--- a/TAO/tests/Quoter/Criteria_Evaluator.h
+++ b/TAO/tests/Quoter/Criteria_Evaluator.h
@@ -19,13 +19,13 @@
#if !defined (CRITERIA_EVALUATOR_H_H)
#define CRITERIA_EVALUATOR_H_H
-class Quoter_Criteria_Evaluator : public Stock::Criteria_Evaluator
+class Quoter_Criteria_Evaluator// : public Stock::Criteria_Evaluator
{
// = TILE
//
public:
- Quoter_Criteria_Evaluator (const CosLifeCycle::Criteria criteria);
+ Quoter_Criteria_Evaluator (const CosLifeCycle::Criteria & criteria);
~Quoter_Criteria_Evaluator ();
Stock::Criteria_Evaluator::SeqNamedValuePair * getInitialization (CORBA::Environment &_tao_environment);
@@ -42,13 +42,13 @@ public:
return 0;
}
- void setCriteria (const CosLifeCycle::Criteria & criteria,
- CORBA::Environment &_tao_environment);
+ // void setCriteria (const CosLifeCycle::Criteria & criteria,
+ // CORBA::Environment &_tao_environment);
private:
CORBA::Any *getCriteriaMember (const CORBA::String member_name);
- CosLifeCycle::Criteria criteria_;
+ const CosLifeCycle::Criteria &criteria_;
};
#endif /* CRITERIA_EVALUATOR_H */
diff --git a/TAO/tests/Quoter/Factory_Trader.cpp b/TAO/tests/Quoter/Factory_Trader.cpp
index 00050365e0a..a9590342557 100644
--- a/TAO/tests/Quoter/Factory_Trader.cpp
+++ b/TAO/tests/Quoter/Factory_Trader.cpp
@@ -92,10 +92,10 @@ Factory_Trader::add_type ()
// Add the new type
incarnationNumber = this->repository_.add_type (CORBA::string_dup("Factory"),
- GENERIC_FACTORY_INTERFACE_REPOSITORY_ID,
- propStructSeq,
- superTypeSeq,
- TAO_TRY_ENV);
+ GENERIC_FACTORY_INTERFACE_REPOSITORY_ID,
+ propStructSeq,
+ superTypeSeq,
+ TAO_TRY_ENV);
TAO_CHECK_ENV;
}
TAO_CATCH (CORBA::UserException, userex)
@@ -148,6 +148,7 @@ Factory_Trader::export (const char * name,
CORBA::string_dup("Factory"),
propertySeq,
TAO_TRY_ENV);
+
TAO_CHECK_ENV;
}
TAO_CATCH (CORBA::UserException, userex)
diff --git a/TAO/tests/Quoter/Generic_Factory.cpp b/TAO/tests/Quoter/Generic_Factory.cpp
index 27c7f9d6190..15573c32079 100644
--- a/TAO/tests/Quoter/Generic_Factory.cpp
+++ b/TAO/tests/Quoter/Generic_Factory.cpp
@@ -135,20 +135,57 @@ Quoter_Generic_Factory_Server::init (int argc,
// Bind the Quoter GenericFactory to the IDL_Quoter naming
// context.
- CosNaming::Name quoter_Generic_Factory_Name_ (1);
- quoter_Generic_Factory_Name_.length (1);
- quoter_Generic_Factory_Name_[0].id = CORBA::string_dup ("Quoter_Generic_Factory");
+ CosNaming::Name quoter_Generic_Factory_Name (1);
+ quoter_Generic_Factory_Name.length (1);
+ quoter_Generic_Factory_Name[0].id = CORBA::string_dup ("Quoter_Generic_Factory");
- quoterNamingContext_var_->bind (quoter_Generic_Factory_Name_,
+ quoterNamingContext_var_->bind (quoter_Generic_Factory_Name,
this->quoter_Generic_Factory_Impl_ptr_->_this(TAO_TRY_ENV),
TAO_TRY_ENV);
TAO_CHECK_ENV;
ACE_DEBUG ((LM_DEBUG,
"Bound the Quoter GenericFactory to the Quoter Naming Context.\n"));
+
+ // now the Quoter GenericFactory is bound to the Naming Context
+ // the Generic Factory should try to register itself to the closest
+ // Life Cycle Service is order to be called.
+
+ // get the Quoter_Life_Cycle_Service
+ CosNaming::Name quoter_Life_Cycle_Service_Name (1);
+ quoter_Life_Cycle_Service_Name.length (1);
+ quoter_Life_Cycle_Service_Name[0].id = CORBA::string_dup ("Quoter_Life_Cycle_Service");
+
+ CORBA::Object_var quoter_Life_Cycle_Service_Obj_var =
+ quoterNamingContext_var_->resolve (quoter_Life_Cycle_Service_Name,
+ TAO_TRY_ENV);
+ TAO_CHECK_ENV;
+
+ Stock::Quoter_Life_Cycle_Service_var quoter_Life_Cycle_Service_var =
+ Stock::Quoter_Life_Cycle_Service::_narrow (quoter_Life_Cycle_Service_Obj_var.in (),
+ TAO_TRY_ENV);
+ TAO_CHECK_ENV;
+
+ ACE_DEBUG ((LM_DEBUG,
+ "Have a proper reference to the Quoter Life Cycle Service.\n"));
+
+ CORBA::Object_var object_var = this->quoter_Generic_Factory_Impl_ptr_->_this(TAO_TRY_ENV);
+
+ // @@ necessary if you specify an ORB port not equal to 0
+ // ACE_Time_Value time_Value = 0;
+ // orb_manager_.orb()->run (&time_Value);
+ // register with the Quoter_Life_Cycle_Service
+ quoter_Life_Cycle_Service_var->register_factory ("Quoter_Generic_Factory", // name
+ "Bryan 503", // location
+ "Generic Factory", // description
+ object_var,
+ TAO_TRY_ENV);
+ TAO_CHECK_ENV;
+ ACE_DEBUG ((LM_DEBUG,
+ "Registered the Quoter GenericFactory to the Quoter Life Cycle Service.\n"));
}
TAO_CATCHANY
{
- TAO_TRY_ENV.print_exception ("SYS_EX");
+ TAO_TRY_ENV.print_exception ("Quoter_Generic_Factory_Server::init: Exception");
}
TAO_ENDTRY;
diff --git a/TAO/tests/Quoter/Generic_Factory_Impl.h b/TAO/tests/Quoter/Generic_Factory_Impl.h
index c779338a252..d8dca241702 100644
--- a/TAO/tests/Quoter/Generic_Factory_Impl.h
+++ b/TAO/tests/Quoter/Generic_Factory_Impl.h
@@ -19,7 +19,7 @@
#if !defined (QUOTER_GENERIC_FACTORY_IMPL_H)
#define QUOTER_GENERIC_FACTORY_IMPL_H
-class Quoter_Generic_Factory_Impl : public POA_Stock::Quoter_Generic_Factory
+class Quoter_Generic_Factory_Impl : public POA_Stock::Quoter_Generic_Factory
{
// = TILE
// A CosLifeCycle conforming Generic Factory for the Quoter
diff --git a/TAO/tests/Quoter/Life_Cycle_Service.cpp b/TAO/tests/Quoter/Life_Cycle_Service.cpp
index 98bfa8867a6..4782e9658f7 100644
--- a/TAO/tests/Quoter/Life_Cycle_Service.cpp
+++ b/TAO/tests/Quoter/Life_Cycle_Service.cpp
@@ -144,7 +144,7 @@ Quoter_Life_Cycle_Service_Server::init (int argc,
TAO_TRY_ENV);
TAO_CHECK_ENV;
ACE_DEBUG ((LM_DEBUG,
- "Bound the Quoter GenericFactory to the Quoter Naming Context.\n"));
+ "Bound the Quoter Life Cycle Service to the Quoter Naming Context.\n"));
}
TAO_CATCHANY
{
diff --git a/TAO/tests/Quoter/Life_Cycle_Service.h b/TAO/tests/Quoter/Life_Cycle_Service.h
index 5cc023c6121..5fed5eea3a1 100644
--- a/TAO/tests/Quoter/Life_Cycle_Service.h
+++ b/TAO/tests/Quoter/Life_Cycle_Service.h
@@ -17,8 +17,8 @@
#include "tao/TAO.h"
#include "Life_Cycle_Service_Impl.h"
-#if !defined (LIFE_CYCLE_SERVICE_H)
-#define LIFE_CYCLE_SERVICE_H
+#if !defined (QUOTER_LIFE_CYCLE_SERVICE_H)
+#define QUOTER_LIFE_CYCLE_SERVICE_H
class Quoter_Life_Cycle_Service_Server
{
@@ -47,7 +47,7 @@ private:
TAO_ORB_Manager orb_manager_;
// instance of the ORB Manager
- Quoter_Generic_Factory_Impl *quoter_Generic_Factory_Impl_ptr_;
+ Quoter_Life_Cycle_Service_Impl *quoter_Life_Cycle_Service_Impl_ptr_;
// Instance of the Quoter Generic Factory.
CosNaming::NamingContext_var quoterNamingContext_var_;
@@ -60,4 +60,5 @@ private:
// commandline arguments.
};
-#endif /* LIFE_CYCLE_SERVICE_H */
+#endif /* QUOTER_LIFE_CYCLE_SERVICE_H */
+
diff --git a/TAO/tests/Quoter/Life_Cycle_Service_Impl.cpp b/TAO/tests/Quoter/Life_Cycle_Service_Impl.cpp
index d3ec2b52840..2306714cb8e 100644
--- a/TAO/tests/Quoter/Life_Cycle_Service_Impl.cpp
+++ b/TAO/tests/Quoter/Life_Cycle_Service_Impl.cpp
@@ -16,13 +16,15 @@
#include "ace/Get_Opt.h"
#include "tao/corba.h"
-#include "Life_Cycle_Service_Impl.h"
#include "QuoterC.h"
+#include "Life_Cycle_Service_Impl.h"
+
static const char usage [] = "[-? |\n[-O[RBport] ORB port number]]";
// Constructor
Quoter_Life_Cycle_Service_Impl::Quoter_Life_Cycle_Service_Impl (void)
+ : factory_trader_ptr_ (0)
{
}
@@ -46,46 +48,92 @@ Quoter_Life_Cycle_Service_Impl::create_object (const CosLifeCycle::Key &factory_
const CosLifeCycle::Criteria &the_criteria,
CORBA::Environment &_env_there)
{
+ ACE_DEBUG ((LM_DEBUG, "Quoter_Life_Cycle_Service_Impl:create_object: called.\n"));
// Exceptions are forwarded, not handled !!
if (factory_trader_ptr_ != 0)
{
- if (criteria_evaluator_var_ == 0)
- {
- ACE_NEW_RETURN (criteria_evaluator_var_, Quoter_Criteria_Evaluator(the_criteria), 0);
- }
- else // the object is instantiated already
+ Quoter_Criteria_Evaluator criteria_Evaluator(the_criteria);
+ ACE_DEBUG ((LM_DEBUG, "Quoter_Life_Cycle_Service_Impl:create_object: new evaluator.\n"));
+
+ ACE_DEBUG ((LM_DEBUG, "Quoter_Life_Cycle_Service_Impl:create_object: getFilter will be called.\n"));
+
+ CORBA::String filter = criteria_Evaluator.getFilter (_env_there);
+
+ if (_env_there.exception() != 0)
{
- CORBA::Environment env;
+ return 0;
+ }
+
+ ACE_DEBUG ((LM_DEBUG, "Quoter_Life_Cycle_Service_Impl:create_object: query(%s) will be called.\n",filter));
- // feed in the criteria
- criteria_evaluator_var_->setCriteria (the_criteria, _env_there);
+ CORBA::Object_ptr genericFactoryObj_ptr = factory_trader_ptr_->query (filter);
+
+ ACE_DEBUG ((LM_DEBUG, "Quoter_Life_Cycle_Service_Impl:create_object: query was called.\n"));
+
+ if (CORBA::is_nil (genericFactoryObj_ptr))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Quoter_Life_Cycle_Service_Impl::create_object: Factory is nil!\n"),
+ 0);
+ else // everyting is ok
+ ACE_DEBUG ((LM_DEBUG, "Quoter_Life_Cycle_Service_Impl::create_object: Object reference OK.\n"));
- if (_env_there.exception() != 0)
- {
- return 0;
- }
+ // Now we have a proper reference to a Generic Factory
+ // the create_object call will be forwarded to this factory
+
+
+ // Check if it is a valid Quoter Generic Factory reference
+ if (CORBA::is_nil (genericFactoryObj_ptr))
+ { // throw a NoFactory exception
+ _env_there.exception (new CosLifeCycle::NoFactory (factory_key));
+ return 0;
}
-
- if (criteria_evaluator_var_ != 0)
- {
- CORBA::String filter = criteria_evaluator_var_->getFilter (_env_there);
+ else
+ {
+ // Check if it is a valid Quoter Factory reference.
+ if (CORBA::is_nil (genericFactoryObj_ptr)) // throw a NoFactory exception.
+ {
+ _env_there.exception (new CosLifeCycle::NoFactory (factory_key));
+ return 0;
+ }
+
+ CORBA::Environment env_here;
- if (_env_there.exception() != 0)
- {
+ CosLifeCycle::GenericFactory_var genericFactory_var =
+ CosLifeCycle::GenericFactory::_narrow (genericFactoryObj_ptr,
+ env_here);
+
+ // see if there is an exception, if yes then throw the NoFactory exception
+ if (env_here.exception () != 0) // throw a NoFactory exception
+ {
+ _env_there.exception (new CosLifeCycle::NoFactory (factory_key));
return 0;
- }
+ }
- CORBA::Object_ptr object_ptr = factory_trader_ptr_->query (filter);
-
- if (object_ptr != 0)
- ACE_DEBUG ((LM_DEBUG, "Factory reference OK.\n"));
-
- return CORBA::Object::_duplicate (object_ptr);
- }
- else // pointer is wrong
- {
- return 0;
+ if (CORBA::is_nil (genericFactory_var.in()))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Quoter_Life_Cycle_Service_Impl::create_object: Invalid Generic Factory.\n"),
+ 0);
+
+ ACE_DEBUG ((LM_DEBUG, "Quoter_Life_Cycle_Service_Impl::create_object: Generic Factory reference OK.\n"));
+
+ // Now retrieve the Quoter obj ref corresponding to the key.
+ CORBA::Object_var object_var = genericFactory_var->create_object (factory_key,
+ the_criteria,
+ _env_there);
+
+ ACE_DEBUG ((LM_DEBUG,
+ "Quoter_Life_Cycle_Service_Impl::create_object: Forwarded request.\n"));
+
+ if (CORBA::is_nil (object_var.in()))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Quoter_Life_Cycle_Service_Impl::create_object: Null object refeference returned by factory.\n"),
+ 0);
+
+ ACE_DEBUG ((LM_DEBUG,
+ "Quoter_Life_Cycle_Service_Impl::create_object: Return a object reference to a new object.\n"));
+
+ return CORBA::Object::_duplicate (object_var.in());
}
}
else
@@ -114,7 +162,7 @@ Quoter_Life_Cycle_Service_Impl::register_factory (const char * name,
ACE_DEBUG ((LM_DEBUG, "Registered a factory with:\n"
" name: %s\n"
" location: %s\n"
- " description: %s\n"
+ " description: %s\n",
name, location, description));
}
diff --git a/TAO/tests/Quoter/Life_Cycle_Service_Impl.h b/TAO/tests/Quoter/Life_Cycle_Service_Impl.h
index 54d4b04ab76..9c153076179 100644
--- a/TAO/tests/Quoter/Life_Cycle_Service_Impl.h
+++ b/TAO/tests/Quoter/Life_Cycle_Service_Impl.h
@@ -17,10 +17,10 @@
#include "Factory_Trader.h"
#include "Criteria_Evaluator.h"
-#if !defined (QUOTER_GENERIC_FACTORY_IMPL_H)
-#define QUOTER_GENERIC_FACTORY_IMPL_H
+#if !defined (QUOTER_LIFE_CYCLE_SERVICE_IMPL_H)
+#define QUOTER_LIFE_CYCLE_SERVICE_IMPL_H
-class Quoter_Life_Cycle_Service_Impl : public POA_Stock::Quoter_Life_Cycle_Service
+class Quoter_Life_Cycle_Service_Impl : public POA_Stock::Quoter_Life_Cycle_Service
{
// = TILE
// A CosLifeCycle conforming Generic Factory for the Quoter
@@ -50,8 +50,9 @@ public:
// Registers a factory with specified properties
private:
- Stock::Criteria_Evaluator_var criteria_evaluator_var_;
Factory_Trader *factory_trader_ptr_;
};
-#endif /* QUOTER_GENERIC_FACTORY_IMPL_H */
+#endif /* QUOTER_LIFE_CYCLE_SERVICE_IMPL_H */
+
+
diff --git a/TAO/tests/Quoter/Makefile b/TAO/tests/Quoter/Makefile
index f3e39c3d462..979316a0f86 100644
--- a/TAO/tests/Quoter/Makefile
+++ b/TAO/tests/Quoter/Makefile
@@ -34,7 +34,7 @@ LDFLAGS += -L$(STL_ROOT)/lib
# end of the trading service stuff
-BIN = client server Factory_Finder Generic_Factory
+BIN = client server Factory_Finder Generic_Factory Life_Cycle_Service
BUILD = $(BIN)
@@ -55,7 +55,7 @@ GENERIC_FACTORY_SRCS = \
Generic_Factory.cpp Generic_Factory_Impl.cpp
LIFE_CYCLE_SERVICE_SRCS = \
- Life_Cycle_Service.cpp Life_Cycle_Service.cpp \
+ Life_Cycle_Service.cpp Life_Cycle_Service_Impl.cpp \
Factory_Trader.cpp Criteria_Evaluator.cpp
diff --git a/TAO/tests/Quoter/client.cpp b/TAO/tests/Quoter/client.cpp
index 38f06d117bc..7c4e5b15ecc 100644
--- a/TAO/tests/Quoter/client.cpp
+++ b/TAO/tests/Quoter/client.cpp
@@ -250,6 +250,8 @@ Quoter_Client::init_naming_service (void)
// or to use the life cycle service
factoryName[0].id = CORBA::string_dup ("Quoter_Life_Cycle_Service");
+ ACE_DEBUG ((LM_DEBUG, "Trying to get a reference of a factory.\n"));
+
// Find an appropriate factory over there.
CosLifeCycle::Factories_ptr factories_ptr =
factory_Finder_var_->find_factories (factoryName, TAO_TRY_ENV);
@@ -259,6 +261,9 @@ Quoter_Client::init_naming_service (void)
"Did not get a Generic Quoter Factory.\n"),
-1);
+ ACE_DEBUG ((LM_DEBUG, "Got a proper reference of a factory.\n"));
+
+
// Get the first object reference to a factory.
CORBA::Object_var quoter_FactoryObj_var;
@@ -278,7 +283,7 @@ Quoter_Client::init_naming_service (void)
// to a direct Quoter Factory
// factory_var_ = Stock::Quoter_Factory::_narrow (quoter_FactoryObj_var.in (), TAO_TRY_ENV);
// to a Quoter Generic Factory
- generic_Factory_var_ = Stock::Quoter_Generic_Factory::_narrow (quoter_FactoryObj_var.in (), TAO_TRY_ENV);
+ generic_Factory_var_ = CosLifeCycle::GenericFactory::_narrow (quoter_FactoryObj_var.in (), TAO_TRY_ENV);
TAO_CHECK_ENV;
@@ -365,11 +370,18 @@ Quoter_Client::init (int argc, char **argv)
CosLifeCycle::Key genericFactoryName (1); // max = 1
genericFactoryName.length(1);
genericFactoryName[0].id = CORBA::string_dup ("Generic_Quoter_Factory");
+
+ CosLifeCycle::Criteria criteria(1);
+ criteria.length (1);
+ criteria[0].name = CORBA::string_dup ("filter");
+ criteria[0].value <<= CORBA::string_dup ("name=='Quoter_Generic_Factory'");
+
CORBA::Object_var quoterObject_var =
- this->generic_Factory_var_->create_object (genericFactoryName,
- 0, TAO_TRY_ENV);
+ this->generic_Factory_var_->create_object (genericFactoryName,
+ criteria,
+ TAO_TRY_ENV);
TAO_CHECK_ENV;
-
+
this->quoter_var_ = Stock::Quoter::_narrow (quoterObject_var.in(), TAO_TRY_ENV);
TAO_CHECK_ENV;
diff --git a/TAO/tests/Quoter/client.h b/TAO/tests/Quoter/client.h
index ed52e730545..c4fe0680e68 100644
--- a/TAO/tests/Quoter/client.h
+++ b/TAO/tests/Quoter/client.h
@@ -25,6 +25,7 @@
#include "ace/Thread_Manager.h"
#include "tao/corba.h"
#include "QuoterC.h"
+#include "orbsvcs/CosLifeCycleC.h"
class Quoter_Client
{
@@ -75,7 +76,7 @@ private:
Stock::Quoter_Factory_var factory_var_;
// Pointer to a factory
- Stock::Quoter_Generic_Factory_var generic_Factory_var_;
+ CosLifeCycle::GenericFactory_var generic_Factory_var_;
// Pointer to a generic factory
CORBA::Environment env_;
diff --git a/TAO/tests/Quoter/ss b/TAO/tests/Quoter/ss
index 7502968bc4c..c5b20a9e11a 100755
--- a/TAO/tests/Quoter/ss
+++ b/TAO/tests/Quoter/ss
@@ -38,6 +38,15 @@ if [ -s /tmp/pids$login ]; then
kill $pids
fi
+
+ps -ef | grep Service | grep $login | grep -v grep | cut -c10-17 > /tmp/pids$login
+
+if [ -s /tmp/pids$login ]; then
+ pids=`cat /tmp/pids$login`
+ kill $pids
+fi
+
+
# stop here if "ss clean" was called
if [ $1 ]; then
if [ $1 = "clean" ]; then
@@ -54,17 +63,19 @@ fi
echo // Logfile for the script "ss" which startes Name, Scheduling and Event Service > /tmp/logfile_$login
nameserviceport=`expr 20023 + $uid`
-serverport=`expr 60023 + $uid`
-factoryfinderport=`expr 100023 + $uid`
-genericfactoryport=`expr 110023 + $uid`
-clientport=`expr 90023 + $uid`
+serverport=`expr 20024 + $uid`
+factoryfinderport=`expr 20025 + $uid`
+# the next port number is an exception, because we have nested call-backs
+genericfactoryport=0 # `expr 20026 + $uid`
+lifecycleserviceport=`expr 20027 + $uid`
+clientport=`expr 20028 + $uid`
cd $TAO_ROOT/orbsvcs/Naming_Service
-./Naming_Service -ORBport $nameserviceport -ORBobjrefstyle URL>> /tmp/logfile_$login 2>&1 &
+./Naming_Service -ORBport $nameserviceport >> /tmp/logfile_$login 2>&1 &
sleep 2
-IOR=`cat /tmp/logfile_$login | grep iiop | cut -c22-300 | cut -f1 -d">" `
+IOR=`cat /tmp/logfile_$login | grep IOR | cut -c22-300 | cut -f1 -d">" `
echo // The IOR of the Naming Service: $IOR
@@ -73,26 +84,34 @@ echo // Started Naming Service on port $nameserviceport
cd $TAO_ROOT/tests/Quoter
./server -ORBnameserviceior $IOR -ORBport $serverport >> /tmp/logfile_$login 2>&1 &
-sleep 2
-
echo // Started server on port $serverport
+sleep 2
+
./Factory_Finder -ORBnameserviceior $IOR -ORBport $factoryfinderport >> /tmp/logfile_$login 2>&1 &
-sleep 2
echo // Started Factory Finder on port $factoryfinderport
+sleep 2
+
+./Life_Cycle_Service -ORBnameserviceior $IOR -ORBport $lifecycleserviceport >> /tmp/logfile_$login 2>&1 &
+
+echo // Started the Life Cycle Service on port $lifecycleserviceport
+
+sleep 2
+
./Generic_Factory -ORBnameserviceior $IOR -ORBport $genericfactoryport >> /tmp/logfile_$login 2>&1 &
echo // Started Generic Factory on port $genericfactoryport
+
echo "// Enjoy the use ;-)"
echo call the client:
echo ..
ps -ef | grep mk1 | grep ORBnameserviceior
echo ..
echo ..
-./client -ORBnameserviceior $IOR -ORBport $clientport
+ ./client -ORBnameserviceior $IOR -ORBport $clientport
cd $old_dir