summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/test/Freeze/evictor/Server.cpp2
-rw-r--r--cpp/test/Freeze/evictor/TestI.cpp21
-rw-r--r--cpp/test/Freeze/evictor/TestI.h6
-rw-r--r--cpp/test/Freeze/oldevictor/Server.cpp2
-rw-r--r--cpp/test/Freeze/oldevictor/TestI.cpp20
-rw-r--r--cpp/test/Freeze/oldevictor/TestI.h6
-rw-r--r--cpp/test/Ice/checksum/server/Server.cpp2
-rw-r--r--cpp/test/Ice/checksum/server/TestI.cpp7
-rw-r--r--cpp/test/Ice/checksum/server/TestI.h6
-rw-r--r--cpp/test/Ice/exceptions/Collocated.cpp2
-rw-r--r--cpp/test/Ice/exceptions/Server.cpp2
-rw-r--r--cpp/test/Ice/exceptions/ServerAMD.cpp2
-rw-r--r--cpp/test/Ice/exceptions/TestAMDI.cpp7
-rw-r--r--cpp/test/Ice/exceptions/TestAMDI.h6
-rw-r--r--cpp/test/Ice/exceptions/TestI.cpp7
-rw-r--r--cpp/test/Ice/exceptions/TestI.h6
-rw-r--r--cpp/test/Ice/faultTolerance/Server.cpp2
-rw-r--r--cpp/test/Ice/faultTolerance/TestI.cpp7
-rw-r--r--cpp/test/Ice/faultTolerance/TestI.h6
-rw-r--r--cpp/test/Ice/inheritance/TestI.cpp23
-rw-r--r--cpp/test/Ice/inheritance/TestI.h1
-rw-r--r--cpp/test/Ice/location/Server.cpp2
-rw-r--r--cpp/test/Ice/location/TestI.cpp9
-rw-r--r--cpp/test/Ice/location/TestI.h4
-rw-r--r--cpp/test/Ice/slicing/exceptions/Server.cpp2
-rw-r--r--cpp/test/Ice/slicing/exceptions/ServerAMD.cpp2
-rw-r--r--cpp/test/Ice/slicing/exceptions/TestAMDI.cpp7
-rw-r--r--cpp/test/Ice/slicing/exceptions/TestAMDI.h6
-rw-r--r--cpp/test/Ice/slicing/exceptions/TestI.cpp7
-rw-r--r--cpp/test/Ice/slicing/exceptions/TestI.h6
-rw-r--r--cpp/test/Ice/slicing/objects/Server.cpp2
-rw-r--r--cpp/test/Ice/slicing/objects/ServerAMD.cpp2
-rw-r--r--cpp/test/Ice/slicing/objects/TestAMDI.cpp7
-rw-r--r--cpp/test/Ice/slicing/objects/TestAMDI.h6
-rw-r--r--cpp/test/Ice/slicing/objects/TestI.cpp7
-rw-r--r--cpp/test/Ice/slicing/objects/TestI.h6
-rw-r--r--cpp/test/IceGrid/activation/Server.cpp2
-rw-r--r--cpp/test/IceGrid/activation/TestI.cpp11
-rw-r--r--cpp/test/IceGrid/activation/TestI.h3
-rw-r--r--cpp/test/IceGrid/allocation/Server.cpp20
-rw-r--r--cpp/test/IceGrid/allocation/TestI.cpp7
-rw-r--r--cpp/test/IceGrid/allocation/TestI.h3
-rw-r--r--cpp/test/IceGrid/deployer/Server.cpp2
-rw-r--r--cpp/test/IceGrid/deployer/Service.cpp2
-rw-r--r--cpp/test/IceGrid/deployer/TestI.cpp7
-rw-r--r--cpp/test/IceGrid/deployer/TestI.h3
-rw-r--r--cpp/test/IceGrid/distribution/Server.cpp2
-rw-r--r--cpp/test/IceGrid/distribution/TestI.cpp3
-rw-r--r--cpp/test/IceGrid/distribution/TestI.h3
-rw-r--r--cpp/test/IceGrid/replicaGroup/Server.cpp2
-rw-r--r--cpp/test/IceGrid/replicaGroup/Service.cpp2
-rw-r--r--cpp/test/IceGrid/replicaGroup/TestI.cpp13
-rw-r--r--cpp/test/IceGrid/replicaGroup/TestI.h3
-rw-r--r--cpp/test/IceGrid/replication/Server.cpp2
-rw-r--r--cpp/test/IceGrid/replication/TestI.cpp4
-rw-r--r--cpp/test/IceGrid/replication/TestI.h7
-rw-r--r--cpp/test/IceGrid/simple/Server.cpp2
-rw-r--r--cpp/test/IceGrid/simple/TestI.cpp7
-rw-r--r--cpp/test/IceGrid/simple/TestI.h6
-rw-r--r--cpp/test/IceGrid/update/Server.cpp2
-rw-r--r--cpp/test/IceGrid/update/TestI.cpp7
-rw-r--r--cpp/test/IceGrid/update/TestI.h3
62 files changed, 133 insertions, 213 deletions
diff --git a/cpp/test/Freeze/evictor/Server.cpp b/cpp/test/Freeze/evictor/Server.cpp
index 0817429da82..4685efe10d9 100644
--- a/cpp/test/Freeze/evictor/Server.cpp
+++ b/cpp/test/Freeze/evictor/Server.cpp
@@ -75,7 +75,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator, const stri
communicator->addObjectFactory(new FacetFactory, "::Test::Facet");
communicator->addObjectFactory(new AccountFactory, "::Test::Account");
- Test::RemoteEvictorFactoryPtr factory = new Test::RemoteEvictorFactoryI(adapter, envName);
+ Test::RemoteEvictorFactoryPtr factory = new Test::RemoteEvictorFactoryI(envName);
adapter->add(factory, communicator->stringToIdentity("factory"));
adapter->activate();
diff --git a/cpp/test/Freeze/evictor/TestI.cpp b/cpp/test/Freeze/evictor/TestI.cpp
index 70a84c2d5bb..2aaf91e6ddd 100644
--- a/cpp/test/Freeze/evictor/TestI.cpp
+++ b/cpp/test/Freeze/evictor/TestI.cpp
@@ -523,13 +523,11 @@ private:
};
-Test::RemoteEvictorI::RemoteEvictorI(const ObjectAdapterPtr& adapter, const string& envName,
+Test::RemoteEvictorI::RemoteEvictorI(const CommunicatorPtr& communicator, const string& envName,
const string& category, bool transactional) :
- _adapter(adapter),
_envName(envName),
_category(category)
{
- CommunicatorPtr communicator = adapter->getCommunicator();
_evictorAdapter = communicator->createObjectAdapterWithEndpoints(IceUtil::generateUUID(), "default");
Initializer* initializer = new Initializer;
@@ -604,7 +602,7 @@ void
Test::RemoteEvictorI::deactivate(const Current& current)
{
_evictorAdapter->destroy();
- _adapter->remove(_adapter->getCommunicator()->stringToIdentity(_category));
+ current.adapter->remove(current.adapter->getCommunicator()->stringToIdentity(_category));
}
@@ -623,9 +621,7 @@ Test::RemoteEvictorI::destroyAllServants(const string& facetName, const Current&
}
}
-Test::RemoteEvictorFactoryI::RemoteEvictorFactoryI(const ObjectAdapterPtr& adapter,
- const std::string& envName) :
- _adapter(adapter),
+Test::RemoteEvictorFactoryI::RemoteEvictorFactoryI(const std::string& envName) :
_envName(envName)
{
}
@@ -633,13 +629,14 @@ Test::RemoteEvictorFactoryI::RemoteEvictorFactoryI(const ObjectAdapterPtr& adapt
::Test::RemoteEvictorPrx
Test::RemoteEvictorFactoryI::createEvictor(const string& name, bool transactional, const Current& current)
{
- RemoteEvictorIPtr remoteEvictor = new RemoteEvictorI(_adapter, _envName, name, transactional);
- return RemoteEvictorPrx::uncheckedCast(_adapter->add(remoteEvictor,
- _adapter->getCommunicator()->stringToIdentity(name)));
+ RemoteEvictorIPtr remoteEvictor =
+ new RemoteEvictorI(current.adapter->getCommunicator(), _envName, name, transactional);
+ return RemoteEvictorPrx::uncheckedCast(
+ current.adapter->add(remoteEvictor, current.adapter->getCommunicator()->stringToIdentity(name)));
}
void
-Test::RemoteEvictorFactoryI::shutdown(const Current&)
+Test::RemoteEvictorFactoryI::shutdown(const Current& current)
{
- _adapter->getCommunicator()->shutdown();
+ current.adapter->getCommunicator()->shutdown();
}
diff --git a/cpp/test/Freeze/evictor/TestI.h b/cpp/test/Freeze/evictor/TestI.h
index 06509be5a6a..0eeb8f426a7 100644
--- a/cpp/test/Freeze/evictor/TestI.h
+++ b/cpp/test/Freeze/evictor/TestI.h
@@ -118,7 +118,7 @@ class RemoteEvictorI : virtual public RemoteEvictor
{
public:
- RemoteEvictorI(const Ice::ObjectAdapterPtr&, const std::string&, const std::string&, bool);
+ RemoteEvictorI(const Ice::CommunicatorPtr&, const std::string&, const std::string&, bool);
virtual void setSize(::Ice::Int, const Ice::Current&);
@@ -140,7 +140,6 @@ public:
private:
- Ice::ObjectAdapterPtr _adapter;
std::string _envName;
std::string _category;
Freeze::EvictorPtr _evictor;
@@ -151,7 +150,7 @@ class RemoteEvictorFactoryI : virtual public RemoteEvictorFactory
{
public:
- RemoteEvictorFactoryI(const Ice::ObjectAdapterPtr&, const std::string&);
+ RemoteEvictorFactoryI(const std::string&);
virtual ::Test::RemoteEvictorPrx createEvictor(const ::std::string&, bool, const Ice::Current&);
@@ -159,7 +158,6 @@ public:
private:
- Ice::ObjectAdapterPtr _adapter;
const std::string _envName;
};
diff --git a/cpp/test/Freeze/oldevictor/Server.cpp b/cpp/test/Freeze/oldevictor/Server.cpp
index 222e1fc1d9f..23ad942cd45 100644
--- a/cpp/test/Freeze/oldevictor/Server.cpp
+++ b/cpp/test/Freeze/oldevictor/Server.cpp
@@ -53,7 +53,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator, const stri
communicator->getProperties()->setProperty("Factory.Endpoints", "default -p 12010");
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("Factory");
- Test::RemoteEvictorFactoryPtr factory = new Test::RemoteEvictorFactoryI(adapter, envName);
+ Test::RemoteEvictorFactoryPtr factory = new Test::RemoteEvictorFactoryI(envName);
adapter->add(factory, communicator->stringToIdentity("factory"));
Ice::ObjectFactoryPtr servantFactory = new ServantFactory;
diff --git a/cpp/test/Freeze/oldevictor/TestI.cpp b/cpp/test/Freeze/oldevictor/TestI.cpp
index 86c78bd1131..ea546cd21fe 100644
--- a/cpp/test/Freeze/oldevictor/TestI.cpp
+++ b/cpp/test/Freeze/oldevictor/TestI.cpp
@@ -244,12 +244,10 @@ private:
};
-Test::RemoteEvictorI::RemoteEvictorI(const ObjectAdapterPtr& adapter, const string& envName,
+Test::RemoteEvictorI::RemoteEvictorI(const CommunicatorPtr& communicator, const string& envName,
const string& category) :
- _adapter(adapter),
_category(category)
{
- CommunicatorPtr communicator = adapter->getCommunicator();
_evictorAdapter = communicator->createObjectAdapterWithEndpoints(IceUtil::generateUUID(), "default");
Initializer* initializer = new Initializer;
@@ -317,7 +315,7 @@ void
Test::RemoteEvictorI::deactivate(const Current& current)
{
_evictorAdapter->destroy();
- _adapter->remove(_adapter->getCommunicator()->stringToIdentity(_category));
+ current.adapter->remove(current.adapter->getCommunicator()->stringToIdentity(_category));
}
@@ -337,9 +335,7 @@ Test::RemoteEvictorI::destroyAllServants(const string& facetName, const Current&
}
-Test::RemoteEvictorFactoryI::RemoteEvictorFactoryI(const ObjectAdapterPtr& adapter,
- const std::string& envName) :
- _adapter(adapter),
+Test::RemoteEvictorFactoryI::RemoteEvictorFactoryI(const std::string& envName) :
_envName(envName)
{
}
@@ -347,13 +343,13 @@ Test::RemoteEvictorFactoryI::RemoteEvictorFactoryI(const ObjectAdapterPtr& adapt
::Test::RemoteEvictorPrx
Test::RemoteEvictorFactoryI::createEvictor(const string& name, const Current& current)
{
- RemoteEvictorIPtr remoteEvictor = new RemoteEvictorI(_adapter, _envName, name);
- return RemoteEvictorPrx::uncheckedCast(_adapter->add(remoteEvictor,
- _adapter->getCommunicator()->stringToIdentity(name)));
+ RemoteEvictorIPtr remoteEvictor = new RemoteEvictorI(current.adapter->getCommunicator(), _envName, name);
+ return RemoteEvictorPrx::uncheckedCast(
+ current.adapter->add(remoteEvictor, current.adapter->getCommunicator()->stringToIdentity(name)));
}
void
-Test::RemoteEvictorFactoryI::shutdown(const Current&)
+Test::RemoteEvictorFactoryI::shutdown(const Current& current)
{
- _adapter->getCommunicator()->shutdown();
+ current.adapter->getCommunicator()->shutdown();
}
diff --git a/cpp/test/Freeze/oldevictor/TestI.h b/cpp/test/Freeze/oldevictor/TestI.h
index ac09c2961b9..182503eb666 100644
--- a/cpp/test/Freeze/oldevictor/TestI.h
+++ b/cpp/test/Freeze/oldevictor/TestI.h
@@ -90,7 +90,7 @@ class RemoteEvictorI : virtual public RemoteEvictor
{
public:
- RemoteEvictorI(const Ice::ObjectAdapterPtr&, const std::string&, const std::string&);
+ RemoteEvictorI(const Ice::CommunicatorPtr&, const std::string&, const std::string&);
virtual void setSize(::Ice::Int, const Ice::Current&);
@@ -106,7 +106,6 @@ public:
private:
- Ice::ObjectAdapterPtr _adapter;
std::string _category;
Freeze::EvictorPtr _evictor;
Ice::ObjectAdapterPtr _evictorAdapter;
@@ -116,7 +115,7 @@ class RemoteEvictorFactoryI : virtual public RemoteEvictorFactory
{
public:
- RemoteEvictorFactoryI(const Ice::ObjectAdapterPtr&, const std::string&);
+ RemoteEvictorFactoryI(const std::string&);
virtual ::Test::RemoteEvictorPrx createEvictor(const ::std::string&, const Ice::Current&);
@@ -124,7 +123,6 @@ public:
private:
- Ice::ObjectAdapterPtr _adapter;
const std::string _envName;
};
diff --git a/cpp/test/Ice/checksum/server/Server.cpp b/cpp/test/Ice/checksum/server/Server.cpp
index 1ca63e1a3de..fa0a7af7375 100644
--- a/cpp/test/Ice/checksum/server/Server.cpp
+++ b/cpp/test/Ice/checksum/server/Server.cpp
@@ -17,7 +17,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
{
communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000");
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter");
- Ice::ObjectPtr object = new ChecksumI(adapter);
+ Ice::ObjectPtr object = new ChecksumI();
adapter->add(object, communicator->stringToIdentity("test"));
adapter->activate();
communicator->waitForShutdown();
diff --git a/cpp/test/Ice/checksum/server/TestI.cpp b/cpp/test/Ice/checksum/server/TestI.cpp
index a779da2d3a2..0b8dafc84f5 100644
--- a/cpp/test/Ice/checksum/server/TestI.cpp
+++ b/cpp/test/Ice/checksum/server/TestI.cpp
@@ -11,8 +11,7 @@
#include <Ice/SliceChecksums.h>
#include <TestI.h>
-ChecksumI::ChecksumI(const Ice::ObjectAdapterPtr& adapter) :
- _adapter(adapter)
+ChecksumI::ChecksumI()
{
}
@@ -23,7 +22,7 @@ ChecksumI::getSliceChecksums(const Ice::Current&) const
}
void
-ChecksumI::shutdown(const Ice::Current&)
+ChecksumI::shutdown(const Ice::Current& current)
{
- _adapter->getCommunicator()->shutdown();
+ current.adapter->getCommunicator()->shutdown();
}
diff --git a/cpp/test/Ice/checksum/server/TestI.h b/cpp/test/Ice/checksum/server/TestI.h
index df1e1a23bb4..2476d7f6910 100644
--- a/cpp/test/Ice/checksum/server/TestI.h
+++ b/cpp/test/Ice/checksum/server/TestI.h
@@ -16,15 +16,11 @@ class ChecksumI : public Test::Checksum
{
public:
- ChecksumI(const Ice::ObjectAdapterPtr&);
+ ChecksumI();
virtual Ice::SliceChecksumDict getSliceChecksums(const Ice::Current&) const;
virtual void shutdown(const Ice::Current&);
-
-private:
-
- Ice::ObjectAdapterPtr _adapter;
};
#endif
diff --git a/cpp/test/Ice/exceptions/Collocated.cpp b/cpp/test/Ice/exceptions/Collocated.cpp
index 1c6e1a8e241..2f7052a865b 100644
--- a/cpp/test/Ice/exceptions/Collocated.cpp
+++ b/cpp/test/Ice/exceptions/Collocated.cpp
@@ -18,7 +18,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
{
communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010");
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter");
- Ice::ObjectPtr object = new ThrowerI(adapter);
+ Ice::ObjectPtr object = new ThrowerI();
adapter->add(object, communicator->stringToIdentity("thrower"));
ThrowerPrx allTests(const Ice::CommunicatorPtr&, bool);
diff --git a/cpp/test/Ice/exceptions/Server.cpp b/cpp/test/Ice/exceptions/Server.cpp
index 683e1cd610d..bbb22773e52 100644
--- a/cpp/test/Ice/exceptions/Server.cpp
+++ b/cpp/test/Ice/exceptions/Server.cpp
@@ -19,7 +19,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
properties->setProperty("Ice.Warn.Dispatch", "0");
communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010:udp");
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter");
- Ice::ObjectPtr object = new ThrowerI(adapter);
+ Ice::ObjectPtr object = new ThrowerI();
adapter->add(object, communicator->stringToIdentity("thrower"));
adapter->activate();
communicator->waitForShutdown();
diff --git a/cpp/test/Ice/exceptions/ServerAMD.cpp b/cpp/test/Ice/exceptions/ServerAMD.cpp
index 3351451e205..cb75c2fb6f2 100644
--- a/cpp/test/Ice/exceptions/ServerAMD.cpp
+++ b/cpp/test/Ice/exceptions/ServerAMD.cpp
@@ -19,7 +19,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
properties->setProperty("Ice.Warn.Dispatch", "0");
communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010:udp");
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter");
- Ice::ObjectPtr object = new ThrowerI(adapter);
+ Ice::ObjectPtr object = new ThrowerI();
adapter->add(object, communicator->stringToIdentity("thrower"));
adapter->activate();
communicator->waitForShutdown();
diff --git a/cpp/test/Ice/exceptions/TestAMDI.cpp b/cpp/test/Ice/exceptions/TestAMDI.cpp
index ceabd3f8238..3d40acb8d79 100644
--- a/cpp/test/Ice/exceptions/TestAMDI.cpp
+++ b/cpp/test/Ice/exceptions/TestAMDI.cpp
@@ -12,16 +12,15 @@
using namespace Test;
-ThrowerI::ThrowerI(const Ice::ObjectAdapterPtr& adapter) :
- _adapter(adapter)
+ThrowerI::ThrowerI()
{
}
void
ThrowerI::shutdown_async(const AMD_Thrower_shutdownPtr& cb,
- const Ice::Current&)
+ const Ice::Current& current)
{
- _adapter->getCommunicator()->shutdown();
+ current.adapter->getCommunicator()->shutdown();
cb->ice_response();
}
diff --git a/cpp/test/Ice/exceptions/TestAMDI.h b/cpp/test/Ice/exceptions/TestAMDI.h
index 20535c54f1c..5ebc028b473 100644
--- a/cpp/test/Ice/exceptions/TestAMDI.h
+++ b/cpp/test/Ice/exceptions/TestAMDI.h
@@ -16,7 +16,7 @@ class ThrowerI : public Test::Thrower
{
public:
- ThrowerI(const Ice::ObjectAdapterPtr&);
+ ThrowerI();
virtual void shutdown_async(const Test::AMD_Thrower_shutdownPtr&,
const Ice::Current&);
@@ -55,10 +55,6 @@ public:
const Ice::Current&);
virtual void throwAssertException_async(const Test::AMD_Thrower_throwAssertExceptionPtr&,
const Ice::Current&);
-
-private:
-
- Ice::ObjectAdapterPtr _adapter;
};
#endif
diff --git a/cpp/test/Ice/exceptions/TestI.cpp b/cpp/test/Ice/exceptions/TestI.cpp
index 1982bc72983..2fbeb608b41 100644
--- a/cpp/test/Ice/exceptions/TestI.cpp
+++ b/cpp/test/Ice/exceptions/TestI.cpp
@@ -12,15 +12,14 @@
using namespace Test;
-ThrowerI::ThrowerI(const Ice::ObjectAdapterPtr& adapter) :
- _adapter(adapter)
+ThrowerI::ThrowerI()
{
}
void
-ThrowerI::shutdown(const Ice::Current&)
+ThrowerI::shutdown(const Ice::Current& current)
{
- _adapter->getCommunicator()->shutdown();
+ current.adapter->getCommunicator()->shutdown();
}
bool
diff --git a/cpp/test/Ice/exceptions/TestI.h b/cpp/test/Ice/exceptions/TestI.h
index 27b93142bc5..708f2f941f3 100644
--- a/cpp/test/Ice/exceptions/TestI.h
+++ b/cpp/test/Ice/exceptions/TestI.h
@@ -16,7 +16,7 @@ class ThrowerI : public Test::Thrower
{
public:
- ThrowerI(const Ice::ObjectAdapterPtr&);
+ ThrowerI();
virtual void shutdown(const Ice::Current&);
virtual bool supportsUndeclaredExceptions(const Ice::Current&);
@@ -38,10 +38,6 @@ public:
virtual void throwLocalException(const Ice::Current&);
virtual void throwNonIceException(const Ice::Current&);
virtual void throwAssertException(const Ice::Current&);
-
-private:
-
- Ice::ObjectAdapterPtr _adapter;
};
#endif
diff --git a/cpp/test/Ice/faultTolerance/Server.cpp b/cpp/test/Ice/faultTolerance/Server.cpp
index c973e163e0e..834630775f5 100644
--- a/cpp/test/Ice/faultTolerance/Server.cpp
+++ b/cpp/test/Ice/faultTolerance/Server.cpp
@@ -52,7 +52,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
endpts << "default -p " << port << ":udp";
communicator->getProperties()->setProperty("TestAdapter.Endpoints", endpts.str());
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter");
- Ice::ObjectPtr object = new TestI(adapter);
+ Ice::ObjectPtr object = new TestI();
adapter->add(object, communicator->stringToIdentity("test"));
adapter->activate();
communicator->waitForShutdown();
diff --git a/cpp/test/Ice/faultTolerance/TestI.cpp b/cpp/test/Ice/faultTolerance/TestI.cpp
index 886fef29621..fa3b4220313 100644
--- a/cpp/test/Ice/faultTolerance/TestI.cpp
+++ b/cpp/test/Ice/faultTolerance/TestI.cpp
@@ -10,15 +10,14 @@
#include <Ice/Ice.h>
#include <TestI.h>
-TestI::TestI(const Ice::ObjectAdapterPtr& adapter) :
- _adapter(adapter)
+TestI::TestI()
{
}
void
-TestI::shutdown(const Ice::Current&)
+TestI::shutdown(const Ice::Current& current)
{
- _adapter->getCommunicator()->shutdown();
+ current.adapter->getCommunicator()->shutdown();
}
void
diff --git a/cpp/test/Ice/faultTolerance/TestI.h b/cpp/test/Ice/faultTolerance/TestI.h
index b0d75279c8a..79caf4c969e 100644
--- a/cpp/test/Ice/faultTolerance/TestI.h
+++ b/cpp/test/Ice/faultTolerance/TestI.h
@@ -16,16 +16,12 @@ class TestI : public Test::TestIntf
{
public:
- TestI(const Ice::ObjectAdapterPtr&);
+ TestI();
virtual void shutdown(const Ice::Current&);
virtual void abort(const Ice::Current&);
virtual void idempotentAbort(const Ice::Current&);
virtual Ice::Int pid(const Ice::Current&);
-
-private:
-
- Ice::ObjectAdapterPtr _adapter;
};
#endif
diff --git a/cpp/test/Ice/inheritance/TestI.cpp b/cpp/test/Ice/inheritance/TestI.cpp
index f98cffdd226..1a174032b04 100644
--- a/cpp/test/Ice/inheritance/TestI.cpp
+++ b/cpp/test/Ice/inheritance/TestI.cpp
@@ -60,23 +60,22 @@ ICI::icop(const MA::ICPrx& p, const Ice::Current&)
return p;
}
-InitialI::InitialI(const Ice::ObjectAdapterPtr& adapter) :
- _adapter(adapter)
+InitialI::InitialI(const Ice::ObjectAdapterPtr& adapter)
{
- _ca = MA::CAPrx::uncheckedCast(_adapter->addWithUUID(new CAI_));
- _cb = MB::CBPrx::uncheckedCast(_adapter->addWithUUID(new CBI));
- _cc = MA::CCPrx::uncheckedCast(_adapter->addWithUUID(new CCI));
- _cd = MA::CDPrx::uncheckedCast(_adapter->addWithUUID(new CDI));
- _ia = MA::IAPrx::uncheckedCast(_adapter->addWithUUID(new IAI));
- _ib1 = MB::IB1Prx::uncheckedCast(_adapter->addWithUUID(new IB1I));
- _ib2 = MB::IB2Prx::uncheckedCast(_adapter->addWithUUID(new IB2I));
- _ic = MA::ICPrx::uncheckedCast(_adapter->addWithUUID(new ICI));
+ _ca = MA::CAPrx::uncheckedCast(adapter->addWithUUID(new CAI_));
+ _cb = MB::CBPrx::uncheckedCast(adapter->addWithUUID(new CBI));
+ _cc = MA::CCPrx::uncheckedCast(adapter->addWithUUID(new CCI));
+ _cd = MA::CDPrx::uncheckedCast(adapter->addWithUUID(new CDI));
+ _ia = MA::IAPrx::uncheckedCast(adapter->addWithUUID(new IAI));
+ _ib1 = MB::IB1Prx::uncheckedCast(adapter->addWithUUID(new IB1I));
+ _ib2 = MB::IB2Prx::uncheckedCast(adapter->addWithUUID(new IB2I));
+ _ic = MA::ICPrx::uncheckedCast(adapter->addWithUUID(new ICI));
}
void
-InitialI::shutdown(const Ice::Current&)
+InitialI::shutdown(const Ice::Current& current)
{
- _adapter->getCommunicator()->shutdown();
+ current.adapter->getCommunicator()->shutdown();
}
MA::CAPrx
diff --git a/cpp/test/Ice/inheritance/TestI.h b/cpp/test/Ice/inheritance/TestI.h
index df4750fba5e..836eae2a749 100644
--- a/cpp/test/Ice/inheritance/TestI.h
+++ b/cpp/test/Ice/inheritance/TestI.h
@@ -31,7 +31,6 @@ public:
private:
- Ice::ObjectAdapterPtr _adapter;
Test::MA::CAPrx _ca;
Test::MB::CBPrx _cb;
Test::MA::CCPrx _cc;
diff --git a/cpp/test/Ice/location/Server.cpp b/cpp/test/Ice/location/Server.cpp
index f4e218c1c83..2964509fbc4 100644
--- a/cpp/test/Ice/location/Server.cpp
+++ b/cpp/test/Ice/location/Server.cpp
@@ -35,7 +35,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator,
//
ServerLocatorRegistryPtr registry = new ServerLocatorRegistry();
registry->addObject(adapter->createProxy(communicator->stringToIdentity("ServerManager")));
- Ice::ObjectPtr object = new ServerManagerI(adapter, registry, initData);
+ Ice::ObjectPtr object = new ServerManagerI(registry, initData);
adapter->add(object, communicator->stringToIdentity("ServerManager"));
Ice::LocatorRegistryPrx registryPrx =
diff --git a/cpp/test/Ice/location/TestI.cpp b/cpp/test/Ice/location/TestI.cpp
index ca65b3d3ebe..a11b305badb 100644
--- a/cpp/test/Ice/location/TestI.cpp
+++ b/cpp/test/Ice/location/TestI.cpp
@@ -13,10 +13,9 @@
using namespace Test;
-ServerManagerI::ServerManagerI(const Ice::ObjectAdapterPtr& adapter,
- const ServerLocatorRegistryPtr& registry,
+ServerManagerI::ServerManagerI(const ServerLocatorRegistryPtr& registry,
const Ice::InitializationData& initData) :
- _adapter(adapter), _registry(registry), _initData(initData), _nextPort(12011)
+ _registry(registry), _initData(initData), _nextPort(12011)
{
_initData.properties->setProperty("TestAdapter.AdapterId", "TestAdapter");
_initData.properties->setProperty("TestAdapter.ReplicaGroupId", "ReplicatedAdapter");
@@ -77,13 +76,13 @@ ServerManagerI::startServer(const Ice::Current& current)
}
void
-ServerManagerI::shutdown(const Ice::Current&)
+ServerManagerI::shutdown(const Ice::Current& current)
{
for(::std::vector<Ice::CommunicatorPtr>::const_iterator i = _communicators.begin(); i != _communicators.end(); ++i)
{
(*i)->destroy();
}
- _adapter->getCommunicator()->shutdown();
+ current.adapter->getCommunicator()->shutdown();
}
diff --git a/cpp/test/Ice/location/TestI.h b/cpp/test/Ice/location/TestI.h
index fd51389ff80..4e1e9ebea96 100644
--- a/cpp/test/Ice/location/TestI.h
+++ b/cpp/test/Ice/location/TestI.h
@@ -18,15 +18,13 @@ class ServerManagerI : public Test::ServerManager
{
public:
- ServerManagerI(const Ice::ObjectAdapterPtr&, const ServerLocatorRegistryPtr&,
- const Ice::InitializationData&);
+ ServerManagerI(const ServerLocatorRegistryPtr&, const Ice::InitializationData&);
virtual void startServer(const Ice::Current&);
virtual void shutdown(const Ice::Current&);
private:
- Ice::ObjectAdapterPtr _adapter;
std::vector<Ice::CommunicatorPtr> _communicators;
ServerLocatorRegistryPtr _registry;
Ice::InitializationData _initData;
diff --git a/cpp/test/Ice/slicing/exceptions/Server.cpp b/cpp/test/Ice/slicing/exceptions/Server.cpp
index 1a729ff6b90..4c6d6a9623c 100644
--- a/cpp/test/Ice/slicing/exceptions/Server.cpp
+++ b/cpp/test/Ice/slicing/exceptions/Server.cpp
@@ -19,7 +19,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
properties->setProperty("Ice.Warn.Dispatch", "0");
communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 2000");
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter");
- Ice::ObjectPtr object = new TestI(adapter);
+ Ice::ObjectPtr object = new TestI();
adapter->add(object, communicator->stringToIdentity("Test"));
adapter->activate();
communicator->waitForShutdown();
diff --git a/cpp/test/Ice/slicing/exceptions/ServerAMD.cpp b/cpp/test/Ice/slicing/exceptions/ServerAMD.cpp
index cc27bf32563..d5f726a21d0 100644
--- a/cpp/test/Ice/slicing/exceptions/ServerAMD.cpp
+++ b/cpp/test/Ice/slicing/exceptions/ServerAMD.cpp
@@ -19,7 +19,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
properties->setProperty("Ice.Warn.Dispatch", "0");
communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 2000");
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter");
- Ice::ObjectPtr object = new TestI(adapter);
+ Ice::ObjectPtr object = new TestI();
adapter->add(object, communicator->stringToIdentity("Test"));
adapter->activate();
communicator->waitForShutdown();
diff --git a/cpp/test/Ice/slicing/exceptions/TestAMDI.cpp b/cpp/test/Ice/slicing/exceptions/TestAMDI.cpp
index 289be65c24a..ea387066f3c 100644
--- a/cpp/test/Ice/slicing/exceptions/TestAMDI.cpp
+++ b/cpp/test/Ice/slicing/exceptions/TestAMDI.cpp
@@ -12,8 +12,7 @@
using namespace Test;
-TestI::TestI(const Ice::ObjectAdapterPtr& adapter) :
- _adapter(adapter)
+TestI::TestI()
{
}
@@ -145,8 +144,8 @@ TestI::unknownMostDerived2AsBase_async(const AMD_TestIntf_unknownMostDerived2AsB
}
void
-TestI::shutdown_async(const AMD_TestIntf_shutdownPtr& cb, const ::Ice::Current&)
+TestI::shutdown_async(const AMD_TestIntf_shutdownPtr& cb, const ::Ice::Current& current)
{
- _adapter->getCommunicator()->shutdown();
+ current.adapter->getCommunicator()->shutdown();
cb->ice_response();
}
diff --git a/cpp/test/Ice/slicing/exceptions/TestAMDI.h b/cpp/test/Ice/slicing/exceptions/TestAMDI.h
index e204437e967..ab5bbc08cc6 100644
--- a/cpp/test/Ice/slicing/exceptions/TestAMDI.h
+++ b/cpp/test/Ice/slicing/exceptions/TestAMDI.h
@@ -16,7 +16,7 @@ class TestI : virtual public Test::TestIntf
{
public:
- TestI(const ::Ice::ObjectAdapterPtr&);
+ TestI();
virtual void baseAsBase_async(const ::Test::AMD_TestIntf_baseAsBasePtr&, const ::Ice::Current&);
virtual void unknownDerivedAsBase_async(const ::Test::AMD_TestIntf_unknownDerivedAsBasePtr&, const ::Ice::Current&);
@@ -51,10 +51,6 @@ public:
const ::Ice::Current&);
virtual void shutdown_async(const ::Test::AMD_TestIntf_shutdownPtr&, const ::Ice::Current&);
-
-private:
-
- const ::Ice::ObjectAdapterPtr& _adapter;
};
#endif
diff --git a/cpp/test/Ice/slicing/exceptions/TestI.cpp b/cpp/test/Ice/slicing/exceptions/TestI.cpp
index de4e45c88a3..b8866f21789 100644
--- a/cpp/test/Ice/slicing/exceptions/TestI.cpp
+++ b/cpp/test/Ice/slicing/exceptions/TestI.cpp
@@ -12,8 +12,7 @@
using namespace Test;
-TestI::TestI(const Ice::ObjectAdapterPtr& adapter) :
- _adapter(adapter)
+TestI::TestI()
{
}
@@ -141,7 +140,7 @@ TestI::unknownMostDerived2AsBase(const ::Ice::Current&)
}
void
-TestI::shutdown(const ::Ice::Current&)
+TestI::shutdown(const ::Ice::Current& current)
{
- _adapter->getCommunicator()->shutdown();
+ current.adapter->getCommunicator()->shutdown();
}
diff --git a/cpp/test/Ice/slicing/exceptions/TestI.h b/cpp/test/Ice/slicing/exceptions/TestI.h
index 113345f4a09..9a353023d68 100644
--- a/cpp/test/Ice/slicing/exceptions/TestI.h
+++ b/cpp/test/Ice/slicing/exceptions/TestI.h
@@ -16,7 +16,7 @@ class TestI : virtual public Test::TestIntf
{
public:
- TestI(const ::Ice::ObjectAdapterPtr&);
+ TestI();
virtual void baseAsBase(const ::Ice::Current&);
virtual void unknownDerivedAsBase(const ::Ice::Current&);
virtual void knownDerivedAsBase(const ::Ice::Current&);
@@ -34,10 +34,6 @@ public:
virtual void unknownMostDerived2AsBase(const ::Ice::Current&);
virtual void shutdown(const ::Ice::Current&);
-
-private:
-
- const ::Ice::ObjectAdapterPtr _adapter;
};
#endif
diff --git a/cpp/test/Ice/slicing/objects/Server.cpp b/cpp/test/Ice/slicing/objects/Server.cpp
index 1a729ff6b90..4c6d6a9623c 100644
--- a/cpp/test/Ice/slicing/objects/Server.cpp
+++ b/cpp/test/Ice/slicing/objects/Server.cpp
@@ -19,7 +19,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
properties->setProperty("Ice.Warn.Dispatch", "0");
communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 2000");
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter");
- Ice::ObjectPtr object = new TestI(adapter);
+ Ice::ObjectPtr object = new TestI();
adapter->add(object, communicator->stringToIdentity("Test"));
adapter->activate();
communicator->waitForShutdown();
diff --git a/cpp/test/Ice/slicing/objects/ServerAMD.cpp b/cpp/test/Ice/slicing/objects/ServerAMD.cpp
index cc27bf32563..d5f726a21d0 100644
--- a/cpp/test/Ice/slicing/objects/ServerAMD.cpp
+++ b/cpp/test/Ice/slicing/objects/ServerAMD.cpp
@@ -19,7 +19,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
properties->setProperty("Ice.Warn.Dispatch", "0");
communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 2000");
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter");
- Ice::ObjectPtr object = new TestI(adapter);
+ Ice::ObjectPtr object = new TestI();
adapter->add(object, communicator->stringToIdentity("Test"));
adapter->activate();
communicator->waitForShutdown();
diff --git a/cpp/test/Ice/slicing/objects/TestAMDI.cpp b/cpp/test/Ice/slicing/objects/TestAMDI.cpp
index d0315d23518..8101ec26098 100644
--- a/cpp/test/Ice/slicing/objects/TestAMDI.cpp
+++ b/cpp/test/Ice/slicing/objects/TestAMDI.cpp
@@ -13,8 +13,7 @@
using namespace Test;
-TestI::TestI(const Ice::ObjectAdapterPtr& adapter) :
- _adapter(adapter)
+TestI::TestI()
{
}
@@ -364,8 +363,8 @@ TestI::useForward_async(const AMD_TestIntf_useForwardPtr& cb, const ::Ice::Curre
}
void
-TestI::shutdown_async(const AMD_TestIntf_shutdownPtr& cb, const ::Ice::Current&)
+TestI::shutdown_async(const AMD_TestIntf_shutdownPtr& cb, const ::Ice::Current& current)
{
- _adapter->getCommunicator()->shutdown();
+ current.adapter->getCommunicator()->shutdown();
cb->ice_response();
}
diff --git a/cpp/test/Ice/slicing/objects/TestAMDI.h b/cpp/test/Ice/slicing/objects/TestAMDI.h
index 7aceca89f9b..ddb6337fef1 100644
--- a/cpp/test/Ice/slicing/objects/TestAMDI.h
+++ b/cpp/test/Ice/slicing/objects/TestAMDI.h
@@ -17,7 +17,7 @@ class TestI : virtual public ::Test::TestIntf
{
public:
- TestI(const ::Ice::ObjectAdapterPtr&);
+ TestI();
virtual void SBaseAsObject_async(const ::Test::AMD_TestIntf_SBaseAsObjectPtr&, const ::Ice::Current&);
virtual void SBaseAsSBase_async(const ::Test::AMD_TestIntf_SBaseAsSBasePtr&, const ::Ice::Current&);
@@ -64,10 +64,6 @@ public:
virtual void useForward_async(const ::Test::AMD_TestIntf_useForwardPtr&, const ::Ice::Current&);
virtual void shutdown_async(const ::Test::AMD_TestIntf_shutdownPtr&, const ::Ice::Current&);
-
-private:
-
- const ::Ice::ObjectAdapterPtr& _adapter;
};
#endif
diff --git a/cpp/test/Ice/slicing/objects/TestI.cpp b/cpp/test/Ice/slicing/objects/TestI.cpp
index af6f77c9be8..94a71a5469d 100644
--- a/cpp/test/Ice/slicing/objects/TestI.cpp
+++ b/cpp/test/Ice/slicing/objects/TestI.cpp
@@ -13,8 +13,7 @@
using namespace Test;
-TestI::TestI(const Ice::ObjectAdapterPtr& adapter) :
- _adapter(adapter)
+TestI::TestI()
{
}
@@ -339,7 +338,7 @@ TestI::useForward(ForwardPtr& f, const ::Ice::Current&)
}
void
-TestI::shutdown(const ::Ice::Current&)
+TestI::shutdown(const ::Ice::Current& current)
{
- _adapter->getCommunicator()->shutdown();
+ current.adapter->getCommunicator()->shutdown();
}
diff --git a/cpp/test/Ice/slicing/objects/TestI.h b/cpp/test/Ice/slicing/objects/TestI.h
index 739e3343e24..7e5223b9a58 100644
--- a/cpp/test/Ice/slicing/objects/TestI.h
+++ b/cpp/test/Ice/slicing/objects/TestI.h
@@ -17,7 +17,7 @@ class TestI : virtual public Test::TestIntf
{
public:
- TestI(const ::Ice::ObjectAdapterPtr&);
+ TestI();
virtual ::Ice::ObjectPtr SBaseAsObject(const ::Ice::Current&);
virtual ::Test::SBasePtr SBaseAsSBase(const ::Ice::Current&);
@@ -56,10 +56,6 @@ public:
virtual void useForward(::Test::ForwardPtr&, const ::Ice::Current&);
virtual void shutdown(const ::Ice::Current&);
-
-private:
-
- const ::Ice::ObjectAdapterPtr _adapter;
};
#endif
diff --git a/cpp/test/IceGrid/activation/Server.cpp b/cpp/test/IceGrid/activation/Server.cpp
index ac98d3884e4..294aaa906a1 100644
--- a/cpp/test/IceGrid/activation/Server.cpp
+++ b/cpp/test/IceGrid/activation/Server.cpp
@@ -34,7 +34,7 @@ Server::run(int argc, char* argv[])
}
Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter");
- TestI* test = new TestI(adapter);
+ TestI* test = new TestI();
Ice::ObjectPtr obj = test;
adapter->add(test, communicator()->stringToIdentity(properties->getProperty("Ice.Admin.ServerId")));
diff --git a/cpp/test/IceGrid/activation/TestI.cpp b/cpp/test/IceGrid/activation/TestI.cpp
index 98ba7898901..8d6fd36cc30 100644
--- a/cpp/test/IceGrid/activation/TestI.cpp
+++ b/cpp/test/IceGrid/activation/TestI.cpp
@@ -12,23 +12,22 @@
using namespace Test;
-TestI::TestI(const Ice::ObjectAdapterPtr& adapter) :
- _adapter(adapter),
+TestI::TestI() :
_failed(false)
{
}
void
-TestI::fail(const Ice::Current&)
+TestI::fail(const Ice::Current& current)
{
_failed = true;
- _adapter->getCommunicator()->shutdown();
+ current.adapter->getCommunicator()->shutdown();
}
void
-TestI::shutdown(const Ice::Current&)
+TestI::shutdown(const Ice::Current& current)
{
- _adapter->getCommunicator()->shutdown();
+ current.adapter->getCommunicator()->shutdown();
}
bool
diff --git a/cpp/test/IceGrid/activation/TestI.h b/cpp/test/IceGrid/activation/TestI.h
index c908480e47e..2b72c3327da 100644
--- a/cpp/test/IceGrid/activation/TestI.h
+++ b/cpp/test/IceGrid/activation/TestI.h
@@ -16,7 +16,7 @@ class TestI : public ::Test::TestIntf
{
public:
- TestI(const Ice::ObjectAdapterPtr&);
+ TestI();
virtual void fail(const Ice::Current&);
virtual void shutdown(const Ice::Current&);
@@ -25,7 +25,6 @@ public:
private:
- Ice::ObjectAdapterPtr _adapter;
bool _failed;
};
diff --git a/cpp/test/IceGrid/allocation/Server.cpp b/cpp/test/IceGrid/allocation/Server.cpp
index d3328642b21..32b98d398fa 100644
--- a/cpp/test/IceGrid/allocation/Server.cpp
+++ b/cpp/test/IceGrid/allocation/Server.cpp
@@ -32,16 +32,16 @@ Server::run(int argc, char* argv[])
string name = properties->getProperty("Ice.ProgramName");
Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Server");
- adapter->add(new TestI(adapter, properties), communicator()->stringToIdentity("allocatable"));
- adapter->add(new TestI(adapter, properties), communicator()->stringToIdentity("nonallocatable"));
- adapter->add(new TestI(adapter, properties), communicator()->stringToIdentity("allocatable1"));
- adapter->add(new TestI(adapter, properties), communicator()->stringToIdentity("allocatable2"));
- adapter->add(new TestI(adapter, properties), communicator()->stringToIdentity("allocatable3"));
- adapter->add(new TestI(adapter, properties), communicator()->stringToIdentity("allocatable4"));
- adapter->add(new TestI(adapter, properties), communicator()->stringToIdentity("allocatable11"));
- adapter->add(new TestI(adapter, properties), communicator()->stringToIdentity("allocatable21"));
- adapter->add(new TestI(adapter, properties), communicator()->stringToIdentity("allocatable31"));
- adapter->add(new TestI(adapter, properties), communicator()->stringToIdentity("allocatable41"));
+ adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable"));
+ adapter->add(new TestI(properties), communicator()->stringToIdentity("nonallocatable"));
+ adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable1"));
+ adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable2"));
+ adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable3"));
+ adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable4"));
+ adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable11"));
+ adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable21"));
+ adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable31"));
+ adapter->add(new TestI(properties), communicator()->stringToIdentity("allocatable41"));
shutdownOnInterrupt();
try
diff --git a/cpp/test/IceGrid/allocation/TestI.cpp b/cpp/test/IceGrid/allocation/TestI.cpp
index 38720224d5b..7fb3ae42223 100644
--- a/cpp/test/IceGrid/allocation/TestI.cpp
+++ b/cpp/test/IceGrid/allocation/TestI.cpp
@@ -10,16 +10,15 @@
#include <Ice/Ice.h>
#include <TestI.h>
-TestI::TestI(const Ice::ObjectAdapterPtr& adapter, const Ice::PropertiesPtr& properties) :
- _adapter(adapter),
+TestI::TestI(const Ice::PropertiesPtr& properties) :
_properties(properties)
{
}
void
-TestI::shutdown(const Ice::Current&)
+TestI::shutdown(const Ice::Current& current)
{
- _adapter->getCommunicator()->shutdown();
+ current.adapter->getCommunicator()->shutdown();
}
std::string
diff --git a/cpp/test/IceGrid/allocation/TestI.h b/cpp/test/IceGrid/allocation/TestI.h
index 13754985532..43512df3af2 100644
--- a/cpp/test/IceGrid/allocation/TestI.h
+++ b/cpp/test/IceGrid/allocation/TestI.h
@@ -16,14 +16,13 @@ class TestI : public ::Test::TestIntf
{
public:
- TestI(const Ice::ObjectAdapterPtr&, const Ice::PropertiesPtr&);
+ TestI(const Ice::PropertiesPtr&);
virtual void shutdown(const Ice::Current&);
virtual std::string getProperty(const std::string&, const Ice::Current&);
private:
- Ice::ObjectAdapterPtr _adapter;
Ice::PropertiesPtr _properties;
};
diff --git a/cpp/test/IceGrid/deployer/Server.cpp b/cpp/test/IceGrid/deployer/Server.cpp
index 91589d0fda9..3f731848996 100644
--- a/cpp/test/IceGrid/deployer/Server.cpp
+++ b/cpp/test/IceGrid/deployer/Server.cpp
@@ -41,7 +41,7 @@ Server::run(int argc, char* argv[])
}
adapter = communicator()->createObjectAdapter("Server");
- Ice::ObjectPtr object = new TestI(adapter, properties);
+ Ice::ObjectPtr object = new TestI(properties);
adapter->add(object, communicator()->stringToIdentity(name));
shutdownOnInterrupt();
diff --git a/cpp/test/IceGrid/deployer/Service.cpp b/cpp/test/IceGrid/deployer/Service.cpp
index 7fcdec77bfe..b5e876b91d8 100644
--- a/cpp/test/IceGrid/deployer/Service.cpp
+++ b/cpp/test/IceGrid/deployer/Service.cpp
@@ -65,7 +65,7 @@ ServiceI::start(const string& name,
//
Freeze::createConnection(communicator, name);
}
- Ice::ObjectPtr object = new TestI(adapter, properties);
+ Ice::ObjectPtr object = new TestI(properties);
adapter->add(object, communicator->stringToIdentity(properties->getProperty(name + ".Identity")));
adapter->activate();
}
diff --git a/cpp/test/IceGrid/deployer/TestI.cpp b/cpp/test/IceGrid/deployer/TestI.cpp
index 38720224d5b..7fb3ae42223 100644
--- a/cpp/test/IceGrid/deployer/TestI.cpp
+++ b/cpp/test/IceGrid/deployer/TestI.cpp
@@ -10,16 +10,15 @@
#include <Ice/Ice.h>
#include <TestI.h>
-TestI::TestI(const Ice::ObjectAdapterPtr& adapter, const Ice::PropertiesPtr& properties) :
- _adapter(adapter),
+TestI::TestI(const Ice::PropertiesPtr& properties) :
_properties(properties)
{
}
void
-TestI::shutdown(const Ice::Current&)
+TestI::shutdown(const Ice::Current& current)
{
- _adapter->getCommunicator()->shutdown();
+ current.adapter->getCommunicator()->shutdown();
}
std::string
diff --git a/cpp/test/IceGrid/deployer/TestI.h b/cpp/test/IceGrid/deployer/TestI.h
index 13754985532..43512df3af2 100644
--- a/cpp/test/IceGrid/deployer/TestI.h
+++ b/cpp/test/IceGrid/deployer/TestI.h
@@ -16,14 +16,13 @@ class TestI : public ::Test::TestIntf
{
public:
- TestI(const Ice::ObjectAdapterPtr&, const Ice::PropertiesPtr&);
+ TestI(const Ice::PropertiesPtr&);
virtual void shutdown(const Ice::Current&);
virtual std::string getProperty(const std::string&, const Ice::Current&);
private:
- Ice::ObjectAdapterPtr _adapter;
Ice::PropertiesPtr _properties;
};
diff --git a/cpp/test/IceGrid/distribution/Server.cpp b/cpp/test/IceGrid/distribution/Server.cpp
index d09e89fac6b..c40ad1cc253 100644
--- a/cpp/test/IceGrid/distribution/Server.cpp
+++ b/cpp/test/IceGrid/distribution/Server.cpp
@@ -32,7 +32,7 @@ Server::run(int argc, char* argv[])
string name = properties->getProperty("Ice.ProgramName");
Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Server");
- Ice::ObjectPtr object = new TestI(adapter, properties);
+ Ice::ObjectPtr object = new TestI(properties);
adapter->add(object, communicator()->stringToIdentity(name));
shutdownOnInterrupt();
diff --git a/cpp/test/IceGrid/distribution/TestI.cpp b/cpp/test/IceGrid/distribution/TestI.cpp
index 2b4ccb3fd92..4264f6b5cc2 100644
--- a/cpp/test/IceGrid/distribution/TestI.cpp
+++ b/cpp/test/IceGrid/distribution/TestI.cpp
@@ -14,8 +14,7 @@
using namespace std;
-TestI::TestI(const Ice::ObjectAdapterPtr& adapter, const Ice::PropertiesPtr& properties) :
- _adapter(adapter),
+TestI::TestI(const Ice::PropertiesPtr& properties) :
_properties(properties)
{
}
diff --git a/cpp/test/IceGrid/distribution/TestI.h b/cpp/test/IceGrid/distribution/TestI.h
index 55e8f077e9d..0c3e45e5bd2 100644
--- a/cpp/test/IceGrid/distribution/TestI.h
+++ b/cpp/test/IceGrid/distribution/TestI.h
@@ -16,14 +16,13 @@ class TestI : public ::Test::TestIntf
{
public:
- TestI(const Ice::ObjectAdapterPtr&, const Ice::PropertiesPtr&);
+ TestI(const Ice::PropertiesPtr&);
virtual std::string getServerFile(const std::string&, const Ice::Current&);
virtual std::string getApplicationFile(const std::string&, const Ice::Current&);
private:
- Ice::ObjectAdapterPtr _adapter;
Ice::PropertiesPtr _properties;
};
diff --git a/cpp/test/IceGrid/replicaGroup/Server.cpp b/cpp/test/IceGrid/replicaGroup/Server.cpp
index 52cea5f5156..443e2a976ad 100644
--- a/cpp/test/IceGrid/replicaGroup/Server.cpp
+++ b/cpp/test/IceGrid/replicaGroup/Server.cpp
@@ -24,7 +24,7 @@ int
Server::run(int argc, char* argv[])
{
Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("ReplicatedAdapter");
- Ice::ObjectPtr object = new TestI(adapter, communicator()->getProperties());
+ Ice::ObjectPtr object = new TestI(communicator()->getProperties());
adapter->add(object, communicator()->stringToIdentity(communicator()->getProperties()->getProperty("Identity")));
shutdownOnInterrupt();
try
diff --git a/cpp/test/IceGrid/replicaGroup/Service.cpp b/cpp/test/IceGrid/replicaGroup/Service.cpp
index 2a7ff3802a9..e042ba4ff5e 100644
--- a/cpp/test/IceGrid/replicaGroup/Service.cpp
+++ b/cpp/test/IceGrid/replicaGroup/Service.cpp
@@ -56,7 +56,7 @@ ServiceI::start(const string& name,
const StringSeq& args)
{
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter(name);
- Ice::ObjectPtr object = new TestI(adapter, communicator->getProperties());
+ Ice::ObjectPtr object = new TestI(communicator->getProperties());
adapter->add(object, communicator->stringToIdentity(name));
adapter->add(object, communicator->stringToIdentity(communicator->getProperties()->getProperty("Identity")));
adapter->activate();
diff --git a/cpp/test/IceGrid/replicaGroup/TestI.cpp b/cpp/test/IceGrid/replicaGroup/TestI.cpp
index 6320dfcd452..86215a7d6bf 100644
--- a/cpp/test/IceGrid/replicaGroup/TestI.cpp
+++ b/cpp/test/IceGrid/replicaGroup/TestI.cpp
@@ -10,21 +10,20 @@
#include <Ice/Ice.h>
#include <TestI.h>
-TestI::TestI(const Ice::ObjectAdapterPtr& adapter, const Ice::PropertiesPtr& properties) :
- _adapter(adapter),
+TestI::TestI(const Ice::PropertiesPtr& properties) :
_properties(properties)
{
}
std::string
-TestI::getReplicaId(const Ice::Current&)
+TestI::getReplicaId(const Ice::Current& current)
{
- return _properties->getProperty(_adapter->getName() + ".AdapterId");
+ return _properties->getProperty(current.adapter->getName() + ".AdapterId");
}
std::string
-TestI::getReplicaIdAndShutdown(const Ice::Current&)
+TestI::getReplicaIdAndShutdown(const Ice::Current& current)
{
- _adapter->getCommunicator()->shutdown();
- return _properties->getProperty(_adapter->getName() + ".AdapterId");
+ current.adapter->getCommunicator()->shutdown();
+ return _properties->getProperty(current.adapter->getName() + ".AdapterId");
}
diff --git a/cpp/test/IceGrid/replicaGroup/TestI.h b/cpp/test/IceGrid/replicaGroup/TestI.h
index c32df3f493d..2189daf9af1 100644
--- a/cpp/test/IceGrid/replicaGroup/TestI.h
+++ b/cpp/test/IceGrid/replicaGroup/TestI.h
@@ -16,14 +16,13 @@ class TestI : public ::Test::TestIntf
{
public:
- TestI(const Ice::ObjectAdapterPtr&, const Ice::PropertiesPtr&);
+ TestI(const Ice::PropertiesPtr&);
virtual std::string getReplicaId(const Ice::Current&);
virtual std::string getReplicaIdAndShutdown(const Ice::Current&);
private:
- Ice::ObjectAdapterPtr _adapter;
Ice::PropertiesPtr _properties;
};
diff --git a/cpp/test/IceGrid/replication/Server.cpp b/cpp/test/IceGrid/replication/Server.cpp
index a054c294555..5897329e273 100644
--- a/cpp/test/IceGrid/replication/Server.cpp
+++ b/cpp/test/IceGrid/replication/Server.cpp
@@ -24,7 +24,7 @@ int
Server::run(int argc, char* argv[])
{
Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter");
- Ice::ObjectPtr object = new TestI(adapter, communicator()->getProperties());
+ Ice::ObjectPtr object = new TestI();
adapter->add(object, communicator()->stringToIdentity(communicator()->getProperties()->getProperty("Identity")));
shutdownOnInterrupt();
try
diff --git a/cpp/test/IceGrid/replication/TestI.cpp b/cpp/test/IceGrid/replication/TestI.cpp
index a6e94ac90ac..be9b2bccd93 100644
--- a/cpp/test/IceGrid/replication/TestI.cpp
+++ b/cpp/test/IceGrid/replication/TestI.cpp
@@ -10,9 +10,7 @@
#include <Ice/Ice.h>
#include <TestI.h>
-TestI::TestI(const Ice::ObjectAdapterPtr& adapter, const Ice::PropertiesPtr& properties) :
- _adapter(adapter),
- _properties(properties)
+TestI::TestI()
{
}
diff --git a/cpp/test/IceGrid/replication/TestI.h b/cpp/test/IceGrid/replication/TestI.h
index 6cd336b9404..afacb6c946b 100644
--- a/cpp/test/IceGrid/replication/TestI.h
+++ b/cpp/test/IceGrid/replication/TestI.h
@@ -16,12 +16,7 @@ class TestI : public ::Test::TestIntf
{
public:
- TestI(const Ice::ObjectAdapterPtr&, const Ice::PropertiesPtr&);
-
-private:
-
- Ice::ObjectAdapterPtr _adapter;
- Ice::PropertiesPtr _properties;
+ TestI();
};
#endif
diff --git a/cpp/test/IceGrid/simple/Server.cpp b/cpp/test/IceGrid/simple/Server.cpp
index 6e2b4ec19f5..241f3220aee 100644
--- a/cpp/test/IceGrid/simple/Server.cpp
+++ b/cpp/test/IceGrid/simple/Server.cpp
@@ -28,7 +28,7 @@ Server::run(int argc, char* argv[])
Ice::stringSeqToArgs(args, argc, argv);
Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter");
- Ice::ObjectPtr object = new TestI(adapter);
+ Ice::ObjectPtr object = new TestI();
adapter->add(object, communicator()->stringToIdentity("test"));
shutdownOnInterrupt();
diff --git a/cpp/test/IceGrid/simple/TestI.cpp b/cpp/test/IceGrid/simple/TestI.cpp
index cfc6e05e3a1..8cda42360ba 100644
--- a/cpp/test/IceGrid/simple/TestI.cpp
+++ b/cpp/test/IceGrid/simple/TestI.cpp
@@ -12,13 +12,12 @@
using namespace Test;
-TestI::TestI(const Ice::ObjectAdapterPtr& adapter) :
- _adapter(adapter)
+TestI::TestI()
{
}
void
-TestI::shutdown(const Ice::Current&)
+TestI::shutdown(const Ice::Current& current)
{
- _adapter->getCommunicator()->shutdown();
+ current.adapter->getCommunicator()->shutdown();
}
diff --git a/cpp/test/IceGrid/simple/TestI.h b/cpp/test/IceGrid/simple/TestI.h
index 88511f94f90..d5a08e0eae2 100644
--- a/cpp/test/IceGrid/simple/TestI.h
+++ b/cpp/test/IceGrid/simple/TestI.h
@@ -16,13 +16,9 @@ class TestI : public ::Test::TestIntf
{
public:
- TestI(const Ice::ObjectAdapterPtr&);
+ TestI();
virtual void shutdown(const Ice::Current&);
-
-private:
-
- Ice::ObjectAdapterPtr _adapter;
};
#endif
diff --git a/cpp/test/IceGrid/update/Server.cpp b/cpp/test/IceGrid/update/Server.cpp
index d09e89fac6b..c40ad1cc253 100644
--- a/cpp/test/IceGrid/update/Server.cpp
+++ b/cpp/test/IceGrid/update/Server.cpp
@@ -32,7 +32,7 @@ Server::run(int argc, char* argv[])
string name = properties->getProperty("Ice.ProgramName");
Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Server");
- Ice::ObjectPtr object = new TestI(adapter, properties);
+ Ice::ObjectPtr object = new TestI(properties);
adapter->add(object, communicator()->stringToIdentity(name));
shutdownOnInterrupt();
diff --git a/cpp/test/IceGrid/update/TestI.cpp b/cpp/test/IceGrid/update/TestI.cpp
index 38720224d5b..7fb3ae42223 100644
--- a/cpp/test/IceGrid/update/TestI.cpp
+++ b/cpp/test/IceGrid/update/TestI.cpp
@@ -10,16 +10,15 @@
#include <Ice/Ice.h>
#include <TestI.h>
-TestI::TestI(const Ice::ObjectAdapterPtr& adapter, const Ice::PropertiesPtr& properties) :
- _adapter(adapter),
+TestI::TestI(const Ice::PropertiesPtr& properties) :
_properties(properties)
{
}
void
-TestI::shutdown(const Ice::Current&)
+TestI::shutdown(const Ice::Current& current)
{
- _adapter->getCommunicator()->shutdown();
+ current.adapter->getCommunicator()->shutdown();
}
std::string
diff --git a/cpp/test/IceGrid/update/TestI.h b/cpp/test/IceGrid/update/TestI.h
index 13754985532..43512df3af2 100644
--- a/cpp/test/IceGrid/update/TestI.h
+++ b/cpp/test/IceGrid/update/TestI.h
@@ -16,14 +16,13 @@ class TestI : public ::Test::TestIntf
{
public:
- TestI(const Ice::ObjectAdapterPtr&, const Ice::PropertiesPtr&);
+ TestI(const Ice::PropertiesPtr&);
virtual void shutdown(const Ice::Current&);
virtual std::string getProperty(const std::string&, const Ice::Current&);
private:
- Ice::ObjectAdapterPtr _adapter;
Ice::PropertiesPtr _properties;
};