diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-04-19 14:54:28 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-04-19 14:54:28 +0000 |
commit | 90283288bc4d4fe6aa0a7ecbc4caa262c5c46a9e (patch) | |
tree | 3399cf11248ce48b992dd63a264568129c420054 | |
parent | fix for assertion failure on FC5 (diff) | |
download | ice-90283288bc4d4fe6aa0a7ecbc4caa262c5c46a9e.tar.bz2 ice-90283288bc4d4fe6aa0a7ecbc4caa262c5c46a9e.tar.xz ice-90283288bc4d4fe6aa0a7ecbc4caa262c5c46a9e.zip |
Added method to detroy session from backend
24 files changed, 689 insertions, 23 deletions
diff --git a/cpp/allTests.py b/cpp/allTests.py index c6306df9db2..2bd723d0b17 100755 --- a/cpp/allTests.py +++ b/cpp/allTests.py @@ -53,7 +53,7 @@ def runTests(tests, num = 0): # tests = [ \ "IceUtil/thread", \ -# "IceUtil/unicode", \ + #"IceUtil/unicode", \ "IceUtil/inputUtil", \ "IceUtil/uuid", \ "Slice/errorDetection", \ @@ -93,6 +93,7 @@ tests = [ \ "Glacier2/router", \ "Glacier2/attack", \ "Glacier2/regex", \ + "Glacier2/sessionControl", \ ] # diff --git a/cpp/demo/Glacier2/callback/SessionI.cpp b/cpp/demo/Glacier2/callback/SessionI.cpp index afe185f5dd4..cfabc3d61b1 100644 --- a/cpp/demo/Glacier2/callback/SessionI.cpp +++ b/cpp/demo/Glacier2/callback/SessionI.cpp @@ -33,7 +33,7 @@ SessionI::destroy(const Ice::Current& current) } Glacier2::SessionPrx -SessionManagerI::create(const string& userId, const Ice::Current& current) +SessionManagerI::create(const string& userId, const Glacier2::SessionControlPrx&, const Ice::Current& current) { cout << "creating session for user `" << userId << "'" << endl; Glacier2::SessionPtr session = new SessionI(userId); diff --git a/cpp/demo/Glacier2/callback/SessionI.h b/cpp/demo/Glacier2/callback/SessionI.h index 2e4cd421b6f..02f570eb708 100644 --- a/cpp/demo/Glacier2/callback/SessionI.h +++ b/cpp/demo/Glacier2/callback/SessionI.h @@ -38,7 +38,7 @@ class SessionManagerI : public Glacier2::SessionManager { public: - virtual Glacier2::SessionPrx create(const std::string&, const Ice::Current&); + virtual Glacier2::SessionPrx create(const std::string&, const Glacier2::SessionControlPrx&, const Ice::Current&); }; #endif diff --git a/cpp/demo/Glacier2/chat/Server.cpp b/cpp/demo/Glacier2/chat/Server.cpp index 3a960dfa641..d36c96e727c 100755 --- a/cpp/demo/Glacier2/chat/Server.cpp +++ b/cpp/demo/Glacier2/chat/Server.cpp @@ -30,7 +30,7 @@ class ChatSessionManagerI : public Glacier2::SessionManager public: virtual Glacier2::SessionPrx - create(const string& userId, const Ice::Current& current) + create(const string& userId, const Glacier2::SessionControlPrx&, const Ice::Current& current) { return Glacier2::SessionPrx::uncheckedCast(current.adapter->addWithUUID(new ChatSessionI(userId))); } diff --git a/cpp/slice/Glacier2/Session.ice b/cpp/slice/Glacier2/Session.ice index 29ae63ab51d..faae9b4f11f 100644 --- a/cpp/slice/Glacier2/Session.ice +++ b/cpp/slice/Glacier2/Session.ice @@ -54,6 +54,24 @@ interface Session /** * + * A administrative session control object, which is tied to the + * lifecycle of a [Session]. + * + * @see Session + * + **/ +interface SessionControl +{ + /** + * + * Destroy the associated session. + * + **/ + void destroy(); +}; + +/** + * * The session manager, which is responsible for managing [Session] * objects. New session objects are created by the [Router] object * calling on an application-provided session manager. If no session @@ -78,7 +96,7 @@ interface SessionManager * cannot be created. * **/ - Session* create(string userId) + Session* create(string userId, SessionControl* control) throws CannotCreateSessionException; }; diff --git a/cpp/src/Glacier2/Glacier2Router.cpp b/cpp/src/Glacier2/Glacier2Router.cpp index ccc73487add..5f9676f1cbe 100644 --- a/cpp/src/Glacier2/Glacier2Router.cpp +++ b/cpp/src/Glacier2/Glacier2Router.cpp @@ -223,7 +223,7 @@ Glacier2::RouterService::start(int argc, char* argv[]) // and all required servant locators, so no registration has to be // done here. // - _sessionRouter = new SessionRouterI(clientAdapter, serverAdapter, verifier, sessionManager); + _sessionRouter = new SessionRouterI(clientAdapter, serverAdapter, adminAdapter, verifier, sessionManager); // // If we have an admin adapter, we add an admin object. diff --git a/cpp/src/Glacier2/RouterI.cpp b/cpp/src/Glacier2/RouterI.cpp index 4e1b7a51744..6dbd435c282 100644 --- a/cpp/src/Glacier2/RouterI.cpp +++ b/cpp/src/Glacier2/RouterI.cpp @@ -17,13 +17,16 @@ using namespace Ice; using namespace Glacier2; Glacier2::RouterI::RouterI(const ObjectAdapterPtr& clientAdapter, const ObjectAdapterPtr& serverAdapter, - const ConnectionPtr& connection, const string& userId, const SessionPrx& session) : + const ObjectAdapterPtr& adminAdapter, const ConnectionPtr& connection, + const string& userId, const SessionPrx& session, const Identity& controlId) : _communicator(clientAdapter->getCommunicator()), _routingTable(new RoutingTable(_communicator)), _clientProxy(clientAdapter->createProxy(stringToIdentity("dummy"))), + _adminAdapter(adminAdapter), _connection(connection), _userId(userId), _session(session), + _controlId(controlId), _timestamp(IceUtil::Time::now()), _destroy(false) { @@ -103,6 +106,20 @@ Glacier2::RouterI::destroy() if(_session) { + if(_adminAdapter) + { + // + // Remove the session control object. + // + try + { + _adminAdapter->remove(_controlId); + } + catch(const NotRegisteredException&) + { + } + } + // // This can raise an exception, therefore it must be the last // statement in this destroy() function. diff --git a/cpp/src/Glacier2/RouterI.h b/cpp/src/Glacier2/RouterI.h index 4240e808d61..1ab1ea50000 100644 --- a/cpp/src/Glacier2/RouterI.h +++ b/cpp/src/Glacier2/RouterI.h @@ -26,8 +26,8 @@ class RouterI : public Router, public IceUtil::Mutex { public: - RouterI(const Ice::ObjectAdapterPtr&, const Ice::ObjectAdapterPtr&, const Ice::ConnectionPtr&, - const std::string&, const SessionPrx&); + RouterI(const Ice::ObjectAdapterPtr&, const Ice::ObjectAdapterPtr&, const Ice::ObjectAdapterPtr&, + const Ice::ConnectionPtr&, const std::string&, const SessionPrx&, const Ice::Identity&); virtual ~RouterI(); void destroy(); @@ -56,9 +56,11 @@ private: const Ice::ObjectPrx _serverProxy; const ClientBlobjectPtr _clientBlobject; const ServerBlobjectPtr _serverBlobject; + const Ice::ObjectAdapterPtr _adminAdapter; const Ice::ConnectionPtr _connection; const std::string _userId; const SessionPrx _session; + const Ice::Identity _controlId; mutable IceUtil::Time _timestamp; bool _destroy; }; diff --git a/cpp/src/Glacier2/SessionRouterI.cpp b/cpp/src/Glacier2/SessionRouterI.cpp index 6efbd9d5b67..87ff6b86426 100644 --- a/cpp/src/Glacier2/SessionRouterI.cpp +++ b/cpp/src/Glacier2/SessionRouterI.cpp @@ -18,6 +18,28 @@ using namespace std; using namespace Ice; using namespace Glacier2; +class SessionControlI : public SessionControl +{ +public: + + SessionControlI(const SessionRouterIPtr& sessionRouter, const ConnectionPtr& connection) : + _sessionRouter(sessionRouter), + _connection(connection) + { + } + + virtual void + destroy(const Current&) + { + _sessionRouter->destroySession(_connection); + } + +private: + + SessionRouterIPtr _sessionRouter; + ConnectionPtr _connection; +}; + class ClientLocator : public ServantLocator { public: @@ -80,6 +102,7 @@ private: Glacier2::SessionRouterI::SessionRouterI(const ObjectAdapterPtr& clientAdapter, const ObjectAdapterPtr& serverAdapter, + const ObjectAdapterPtr& adminAdapter, const PermissionsVerifierPrx& verifier, const SessionManagerPrx& sessionManager) : _properties(clientAdapter->getCommunicator()->getProperties()), @@ -88,6 +111,7 @@ Glacier2::SessionRouterI::SessionRouterI(const ObjectAdapterPtr& clientAdapter, _rejectTraceLevel(_properties->getPropertyAsInt("Glacier2.Client.Trace.Reject")), _clientAdapter(clientAdapter), _serverAdapter(serverAdapter), + _adminAdapter(adminAdapter), _verifier(verifier), _sessionManager(sessionManager), _sessionTimeout(IceUtil::Time::seconds(_properties->getPropertyAsInt("Glacier2.SessionTimeout"))), @@ -362,6 +386,7 @@ Glacier2::SessionRouterI::createSession(const std::string& userId, const std::st SessionPrx session; + Identity controlId; RouterIPtr router; try @@ -372,13 +397,20 @@ Glacier2::SessionRouterI::createSession(const std::string& userId, const std::st // if(_sessionManager) { - session = _sessionManager->create(userId, current.ctx); + SessionControlPrx control; + if(_adminAdapter) + { + control = SessionControlPrx::uncheckedCast(_adminAdapter->addWithUUID( + new SessionControlI(this, current.con))); + controlId = control->ice_getIdentity(); + } + session = _sessionManager->create(userId, control, current.ctx); } // // Add a new per-client router. // - router = new RouterI(_clientAdapter, _serverAdapter, current.con, userId, session); + router = new RouterI(_clientAdapter, _serverAdapter, _adminAdapter, current.con, userId, session, controlId); } catch(const Exception& ex) { @@ -461,6 +493,12 @@ Glacier2::SessionRouterI::createSession(const std::string& userId, const std::st void Glacier2::SessionRouterI::destroySession(const Current& current) { + destroySession(current.con); +} + +void +Glacier2::SessionRouterI::destroySession(const ConnectionPtr& connection) +{ RouterIPtr router; { @@ -468,19 +506,19 @@ Glacier2::SessionRouterI::destroySession(const Current& current) if(_destroy) { - current.con->close(true); + connection->close(true); throw ObjectNotExistException(__FILE__, __LINE__); } map<ConnectionPtr, RouterIPtr>::iterator p; - if(_routersByConnectionHint != _routersByConnection.end() && _routersByConnectionHint->first == current.con) + if(_routersByConnectionHint != _routersByConnection.end() && _routersByConnectionHint->first == connection) { p = _routersByConnectionHint; } else { - p = _routersByConnection.find(current.con); + p = _routersByConnection.find(connection); } if(p == _routersByConnection.end()) diff --git a/cpp/src/Glacier2/SessionRouterI.h b/cpp/src/Glacier2/SessionRouterI.h index f186083d3c2..03e5115b581 100644 --- a/cpp/src/Glacier2/SessionRouterI.h +++ b/cpp/src/Glacier2/SessionRouterI.h @@ -31,7 +31,7 @@ class SessionRouterI : public Router, public IceUtil::Monitor<IceUtil::Mutex> { public: - SessionRouterI(const Ice::ObjectAdapterPtr&, const Ice::ObjectAdapterPtr&, + SessionRouterI(const Ice::ObjectAdapterPtr&, const Ice::ObjectAdapterPtr&, const Ice::ObjectAdapterPtr&, const PermissionsVerifierPrx&, const SessionManagerPrx&); virtual ~SessionRouterI(); void destroy(); @@ -46,9 +46,11 @@ public: RouterIPtr getRouter(const Ice::ConnectionPtr&, const Ice::Identity&) const; RouterIPtr getRouter(const std::string&) const; - + void expireSessions(); + void destroySession(const ::Ice::ConnectionPtr&); + private: const Ice::PropertiesPtr _properties; @@ -57,6 +59,7 @@ private: const int _rejectTraceLevel; const Ice::ObjectAdapterPtr _clientAdapter; const Ice::ObjectAdapterPtr _serverAdapter; + const Ice::ObjectAdapterPtr _adminAdapter; const PermissionsVerifierPrx _verifier; /*const*/ SessionManagerPrx _sessionManager; const IceUtil::Time _sessionTimeout; diff --git a/cpp/src/IceGrid/SessionManagerI.cpp b/cpp/src/IceGrid/SessionManagerI.cpp index 03f14f2129b..7a77844438e 100644 --- a/cpp/src/IceGrid/SessionManagerI.cpp +++ b/cpp/src/IceGrid/SessionManagerI.cpp @@ -31,7 +31,7 @@ SessionManagerI::SessionManagerI(RegistryObserverTopic& regTopic, } Glacier2::SessionPrx -SessionManagerI::create(const string& userId, const Ice::Current& current) +SessionManagerI::create(const string& userId, const Glacier2::SessionControlPrx&, const Ice::Current& current) { SessionIPtr session = new Glacier2ObserverSessionI(userId, _database, _registryObserverTopic, _nodeObserverTopic, _sessionTimeout); diff --git a/cpp/src/IceGrid/SessionManagerI.h b/cpp/src/IceGrid/SessionManagerI.h index bf42a18de57..122fe0ca33f 100644 --- a/cpp/src/IceGrid/SessionManagerI.h +++ b/cpp/src/IceGrid/SessionManagerI.h @@ -33,7 +33,7 @@ public: SessionManagerI(RegistryObserverTopic&, NodeObserverTopic&, const DatabasePtr&, const ReapThreadPtr&, int); - virtual Glacier2::SessionPrx create(const std::string&, const Ice::Current&); + virtual Glacier2::SessionPrx create(const std::string&, const Glacier2::SessionControlPrx&, const Ice::Current&); virtual SessionPrx createLocalSession(const std::string&, const Ice::Current&); private: diff --git a/cpp/src/slice2cppe/Gen.cpp b/cpp/src/slice2cppe/Gen.cpp index 0c3bda566a8..38c9dee2872 100644 --- a/cpp/src/slice2cppe/Gen.cpp +++ b/cpp/src/slice2cppe/Gen.cpp @@ -43,7 +43,8 @@ getIds(const ClassDefPtr& p, StringList& ids) Slice::Gen::Gen(const string& name, const string& base, const string& headerExtension, const string& sourceExtension, const vector<string>& extraHeaders, const string& include, - const vector<string>& includePaths, const string& dllExport, const string& dir, bool imp) : + const vector<string>& includePaths, const string& dllExport, const string& dir, bool imp, + bool ice) : _base(base), _headerExtension(headerExtension), _sourceExtension(sourceExtension), @@ -51,7 +52,8 @@ Slice::Gen::Gen(const string& name, const string& base, const string& headerExte _include(include), _includePaths(includePaths), _dllExport(dllExport), - _impl(imp) + _impl(imp), + _ice(ice) { for(vector<string>::iterator p = _includePaths.begin(); p != _includePaths.end(); ++p) { @@ -250,6 +252,11 @@ Slice::Gen::generate(const UnitPtr& p) H << "\n#include <IceE/UndefSysMacros.h>"; + if(_ice) + { + C << "\n#include <IceE/DisableWarnings.h>"; + } + GlobalIncludeVisitor globalIncludeVisitor(H); p->visit(&globalIncludeVisitor, false); diff --git a/cpp/src/slice2cppe/Gen.h b/cpp/src/slice2cppe/Gen.h index 9be5619bfe5..da1c03cae8a 100644 --- a/cpp/src/slice2cppe/Gen.h +++ b/cpp/src/slice2cppe/Gen.h @@ -35,7 +35,8 @@ public: const std::vector<std::string>&, const std::string&, const std::string&, - bool); + bool, + bool); ~Gen(); bool operator!() const; // Returns true if there was a constructor error @@ -62,6 +63,7 @@ private: std::vector<std::string> _includePaths; std::string _dllExport; bool _impl; + bool _ice; class GlobalIncludeVisitor : private ::IceUtil::noncopyable, public ParserVisitor { diff --git a/cpp/src/slice2cppe/Main.cpp b/cpp/src/slice2cppe/Main.cpp index 7457f79f670..c9261337313 100644 --- a/cpp/src/slice2cppe/Main.cpp +++ b/cpp/src/slice2cppe/Main.cpp @@ -204,7 +204,7 @@ main(int argc, char* argv[]) else { Gen gen(argv[0], icecpp.getBaseName(), headerExtension, sourceExtension, extraHeaders, include, - includePaths, dllExport, output, impl); + includePaths, dllExport, output, impl, ice); if(!gen) { u->destroy(); diff --git a/cpp/test/Glacier2/Makefile b/cpp/test/Glacier2/Makefile index 3e641c45515..a63fc12e2d0 100644 --- a/cpp/test/Glacier2/Makefile +++ b/cpp/test/Glacier2/Makefile @@ -13,7 +13,8 @@ include $(top_srcdir)/config/Make.rules SUBDIRS = router \ attack \ - regex + regex \ + sessionControl $(EVERYTHING):: @for subdir in $(SUBDIRS); \ diff --git a/cpp/test/Glacier2/sessionControl/.depend b/cpp/test/Glacier2/sessionControl/.depend new file mode 100644 index 00000000000..4a77e25f544 --- /dev/null +++ b/cpp/test/Glacier2/sessionControl/.depend @@ -0,0 +1,6 @@ +Client.o: Client.cpp ../../../include/Ice/Application.h ../../../include/Ice/Ice.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/Ice/Config.h ../../../include/Ice/GCShared.h ../../../include/Ice/GC.h ../../../include/IceUtil/Thread.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StreamF.h ../../../include/Ice/StatsF.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/AutoArray.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/FacetMap.h ../../../include/Ice/Locator.h ../../../include/Ice/ProcessF.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/IdentityUtil.h ../../../include/Ice/OutgoingAsync.h ../../../include/Ice/Process.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h ../../../include/Glacier2/Router.h ../../../include/Ice/Router.h ../../../include/Glacier2/Session.h Session.h ../../include/TestCommon.h +Session.o: Session.cpp Session.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Exception.h ../../../include/IceUtil/Config.h ../../../include/Ice/Config.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/Proxy.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/StreamF.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/Object.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/BasicStream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/AutoArray.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Glacier2/Session.h ../../../include/Ice/LocalException.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/ObjectFactory.h ../../../include/IceUtil/Iterator.h +Server.o: Server.cpp ../../../include/Ice/Application.h ../../../include/Ice/Ice.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/Ice/Config.h ../../../include/Ice/GCShared.h ../../../include/Ice/GC.h ../../../include/IceUtil/Thread.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StreamF.h ../../../include/Ice/StatsF.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/AutoArray.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/FacetMap.h ../../../include/Ice/Locator.h ../../../include/Ice/ProcessF.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/IdentityUtil.h ../../../include/Ice/OutgoingAsync.h ../../../include/Ice/Process.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h ../../../include/Glacier2/PermissionsVerifier.h SessionI.h Session.h ../../../include/Glacier2/Session.h +Session.o: Session.cpp Session.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Exception.h ../../../include/IceUtil/Config.h ../../../include/Ice/Config.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/Proxy.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/StreamF.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/Object.h ../../../include/Ice/GCShared.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/BasicStream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/AutoArray.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Glacier2/Session.h ../../../include/Ice/LocalException.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/ObjectFactory.h ../../../include/IceUtil/Iterator.h +SessionI.o: SessionI.cpp ../../../include/Ice/Ice.h ../../../include/Ice/GCRecMutex.h ../../../include/IceUtil/RecMutex.h ../../../include/IceUtil/Config.h ../../../include/IceUtil/Lock.h ../../../include/IceUtil/ThreadException.h ../../../include/IceUtil/Exception.h ../../../include/Ice/Config.h ../../../include/Ice/GCShared.h ../../../include/Ice/GC.h ../../../include/IceUtil/Thread.h ../../../include/IceUtil/Shared.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Mutex.h ../../../include/IceUtil/Monitor.h ../../../include/IceUtil/Cond.h ../../../include/IceUtil/Time.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalObject.h ../../../include/Ice/UndefSysMacros.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/LoggerF.h ../../../include/Ice/StreamF.h ../../../include/Ice/StatsF.h ../../../include/Ice/BuiltinSequences.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/ConnectionIF.h ../../../include/Ice/EndpointIF.h ../../../include/Ice/Endpoint.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/OutgoingAsyncF.h ../../../include/Ice/Current.h ../../../include/Ice/ConnectionF.h ../../../include/Ice/Identity.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/LoggerUtil.h ../../../include/Ice/Stats.h ../../../include/Ice/Communicator.h ../../../include/Ice/ObjectFactoryF.h ../../../include/Ice/RouterF.h ../../../include/Ice/LocatorF.h ../../../include/Ice/PluginF.h ../../../include/Ice/ObjectFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/Object.h ../../../include/Ice/IncomingAsyncF.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Protocol.h ../../../include/IceUtil/AutoArray.h ../../../include/IceUtil/Unicode.h ../../../include/Ice/Incoming.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantManagerF.h ../../../include/Ice/IncomingAsync.h ../../../include/Ice/Direct.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/FactoryTable.h ../../../include/Ice/FactoryTableDef.h ../../../include/IceUtil/StaticMutex.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/FacetMap.h ../../../include/Ice/Locator.h ../../../include/Ice/ProcessF.h ../../../include/Ice/ServantLocator.h ../../../include/Ice/IdentityUtil.h ../../../include/Ice/OutgoingAsync.h ../../../include/Ice/Process.h ../../../include/Ice/Application.h ../../../include/Ice/Connection.h ../../../include/Ice/Functional.h ../../../include/IceUtil/Functional.h ../../../include/Ice/Stream.h SessionI.h Session.h ../../../include/Glacier2/Session.h +Session.cpp: Session.ice ../../../slice/Glacier2/Session.ice diff --git a/cpp/test/Glacier2/sessionControl/Client.cpp b/cpp/test/Glacier2/sessionControl/Client.cpp new file mode 100644 index 00000000000..b0a48d28516 --- /dev/null +++ b/cpp/test/Glacier2/sessionControl/Client.cpp @@ -0,0 +1,95 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#include <Ice/Application.h> +#include <Glacier2/Router.h> +#include <Session.h> +#include <TestCommon.h> +#include <set> + +using namespace std; +using namespace Ice; +using namespace Test; + +class SessionControlClient : public Application +{ +public: + + virtual int run(int, char*[]); +}; + +int +main(int argc, char* argv[]) +{ + PropertiesPtr properties = getDefaultProperties(argc, argv); + + // + // We want to check whether the client retries for evicted + // proxies, even with regular retries disabled. + // + properties->setProperty("Ice.RetryIntervals", "-1"); + properties->setProperty("Ice.Warn.Connections", "0"); + + SessionControlClient app; + return app.main(argc, argv); +} + +int +SessionControlClient::run(int argc, char* argv[]) +{ + cout << "getting router... " << flush; + ObjectPrx routerBase = communicator()->stringToProxy("Glacier2/router:default -p 12347 -t 10000"); + Glacier2::RouterPrx router = Glacier2::RouterPrx::checkedCast(routerBase); + test(router); + cout << "ok" << endl; + + cout << "creating session... " << flush; + Glacier2::SessionPrx sessionBase = router->createSession("userid", "abc123"); + Test::SessionPrx session = Test::SessionPrx::uncheckedCast(sessionBase); + communicator()->setDefaultRouter(router); + cout << "ok" << endl; + + cout << "testing destroy... " << flush; + session->destroySession(); + try + { + session->ice_ping(); + test(false); + } + catch(const ObjectNotExistException& ex) + { + } + cout << "ok" << endl; + + cout << "recreating session... " << flush; + sessionBase = router->createSession("userid", "abc123"); + ObjectPrx base = communicator()->stringToProxy("SessionManager:tcp -p 12010 -t 10000"); + Test::SessionManagerPrx sessionManager = Test::SessionManagerPrx::uncheckedCast(base); + sessionManager->ice_ping(); + cout << "ok" << endl; + + cout << "testing shutdown... " << flush; + sessionManager->shutdown(); + communicator()->setDefaultRouter(0); + ObjectPrx adminBase = communicator()->stringToProxy("Glacier2/admin:tcp -h 127.0.0.1 -p 12348 -t 10000"); + Glacier2::AdminPrx admin = Glacier2::AdminPrx::checkedCast(adminBase); + test(admin); + admin->shutdown(); + try + { + admin->ice_ping(); + test(false); + } + catch(const Ice::LocalException&) + { + cout << "ok" << endl; + } + + return EXIT_SUCCESS; +} diff --git a/cpp/test/Glacier2/sessionControl/Makefile b/cpp/test/Glacier2/sessionControl/Makefile new file mode 100644 index 00000000000..66e326fed0b --- /dev/null +++ b/cpp/test/Glacier2/sessionControl/Makefile @@ -0,0 +1,41 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved. +# +# This copy of Ice is licensed to you under the terms described in the +# ICE_LICENSE file included in this distribution. +# +# ********************************************************************** + +top_srcdir = ../../.. + +CLIENT = client +SERVER = server + +TARGETS = $(CLIENT) $(SERVER) + +COBJS = Client.o \ + Session.o + +SOBJS = Server.o \ + Session.o \ + SessionI.o + +SRCS = $(COBJS:.o=.cpp) \ + $(SOBJS:.o=.cpp) + +SLICE_SRCS = Session.ice + +include $(top_srcdir)/config/Make.rules + +CPPFLAGS := -I. -I../../include $(CPPFLAGS) + +$(CLIENT): $(OBJS) $(COBJS) + rm -f $@ + $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) -lGlacier2 $(LIBS) + +$(SERVER): $(OBJS) $(SOBJS) + rm -f $@ + $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) -lGlacier2 $(LIBS) + +include .depend diff --git a/cpp/test/Glacier2/sessionControl/Server.cpp b/cpp/test/Glacier2/sessionControl/Server.cpp new file mode 100644 index 00000000000..c9479fac71a --- /dev/null +++ b/cpp/test/Glacier2/sessionControl/Server.cpp @@ -0,0 +1,53 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#include <Ice/Application.h> +#include <Glacier2/PermissionsVerifier.h> +#include <SessionI.h> + +using namespace std; +using namespace Ice; +using namespace Test; + +class DummyPermissionsVerifierI : public Glacier2::PermissionsVerifier +{ +public: + + virtual bool + checkPermissions(const string&, const string&, string&, const Ice::Current&) const + { + return true; + } +}; + +class SessionControlServer : public Application +{ +public: + + virtual int run(int, char*[]); +}; + +int +main(int argc, char* argv[]) +{ + SessionControlServer app; + return app.main(argc, argv); +} + +int +SessionControlServer::run(int argc, char* argv[]) +{ + communicator()->getProperties()->setProperty("SessionControlAdapter.Endpoints", "tcp -p 12010 -t 10000"); + ObjectAdapterPtr adapter = communicator()->createObjectAdapter("SessionControlAdapter"); + adapter->add(new DummyPermissionsVerifierI, Ice::stringToIdentity("verifier")); + adapter->add(new SessionManagerI, Ice::stringToIdentity("SessionManager")); + adapter->activate(); + communicator()->waitForShutdown(); + return EXIT_SUCCESS; +} diff --git a/cpp/test/Glacier2/sessionControl/Session.ice b/cpp/test/Glacier2/sessionControl/Session.ice new file mode 100644 index 00000000000..88a1f70f242 --- /dev/null +++ b/cpp/test/Glacier2/sessionControl/Session.ice @@ -0,0 +1,30 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#ifndef SESSION_CONTROL_ICE +#define SESSION_CONTROL_ICE + +#include <Glacier2/Session.ice> + +module Test +{ + +interface Session extends Glacier2::Session +{ + void destroySession(); +}; + +interface SessionManager extends Glacier2::SessionManager +{ + void shutdown(); +}; + +}; + +#endif diff --git a/cpp/test/Glacier2/sessionControl/SessionI.h b/cpp/test/Glacier2/sessionControl/SessionI.h new file mode 100644 index 00000000000..957823d4350 --- /dev/null +++ b/cpp/test/Glacier2/sessionControl/SessionI.h @@ -0,0 +1,38 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#ifndef SESSION_I_H +#define SESSION_I_H + +#include <Session.h> + +class SessionManagerI : public Test::SessionManager +{ +public: + + virtual Glacier2::SessionPrx create(const std::string&, const Glacier2::SessionControlPrx&, const Ice::Current&); + virtual void shutdown(const Ice::Current&); +}; + + +class SessionI : public Test::Session +{ +public: + + SessionI(const Glacier2::SessionControlPrx&); + + virtual void destroySession(const Ice::Current&); + virtual void destroy(const Ice::Current&); + +private: + + Glacier2::SessionControlPrx _sessionControl; +}; + +#endif diff --git a/cpp/test/Glacier2/sessionControl/sessionControlC.dsp b/cpp/test/Glacier2/sessionControl/sessionControlC.dsp new file mode 100644 index 00000000000..ff4e4bc3bc3 --- /dev/null +++ b/cpp/test/Glacier2/sessionControl/sessionControlC.dsp @@ -0,0 +1,153 @@ +# Microsoft Developer Studio Project File - Name="sessionControlC" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=sessionControlC - 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 "sessionControlC.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 "sessionControlC.mak" CFG="sessionControlC - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "sessionControlC - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "sessionControlC - 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)" == "sessionControlC - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I "." /I "../../../include" /I "../../include" /D "_CONSOLE" /D "NDEBUG" /D "WIN32_LEAN_AND_MEAN" /FD /c
+# SUBTRACT CPP /Fr /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 Ice.lib IceUtil.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"client.exe" /libpath:"../../../lib" /FIXED:no
+# SUBTRACT LINK32 /debug /nodefaultlib
+
+!ELSEIF "$(CFG)" == "sessionControlC - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /WX /Gm /GR /GX /Zi /Od /I "." /I "../../../include" /I "../../include" /D "_CONSOLE" /D "_DEBUG" /D "WIN32_LEAN_AND_MEAN" /FD /GZ /c
+# SUBTRACT CPP /Fr /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 Iced.lib IceUtild.lib /nologo /subsystem:console /debug /machine:I386 /out:"client.exe" /pdbtype:sept /libpath:"../../../lib" /FIXED:no
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF
+
+# Begin Target
+
+# Name "sessionControlC - Win32 Release"
+# Name "sessionControlC - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\Session.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Client.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\Session.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Session.ice
+
+!IF "$(CFG)" == "sessionControlC - Win32 Release"
+
+USERDEP__BACKE="..\..\..\bin\slice2cpp.exe" "..\..\..\lib\slice.lib"
+# Begin Custom Build
+InputPath=.\Session.ice
+
+BuildCmds= \
+ ..\..\..\bin\slice2cpp.exe -I../../../slice Session.ice
+
+"Session.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Session.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "sessionControlC - Win32 Debug"
+
+USERDEP__BACKE="..\..\..\bin\slice2cpp.exe" "..\..\..\lib\sliced.lib"
+# Begin Custom Build
+InputPath=.\Session.ice
+
+BuildCmds= \
+ ..\..\..\bin\slice2cpp.exe -I../../../slice Session.ice
+
+"Session.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Session.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/cpp/test/Glacier2/sessionControl/sessionControlS.dsp b/cpp/test/Glacier2/sessionControl/sessionControlS.dsp new file mode 100644 index 00000000000..2683ce8d25a --- /dev/null +++ b/cpp/test/Glacier2/sessionControl/sessionControlS.dsp @@ -0,0 +1,161 @@ +# Microsoft Developer Studio Project File - Name="sessionControlS" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=sessionControlS - 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 "sessionControlS.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 "sessionControlS.mak" CFG="sessionControlS - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "sessionControlS - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "sessionControlS - 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)" == "sessionControlS - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I "." /I "../../../include" /I "../../include" /D "_CONSOLE" /D "NDEBUG" /D "WIN32_LEAN_AND_MEAN" /FD /c
+# SUBTRACT CPP /Fr /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 Ice.lib IceUtil.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"server.exe" /libpath:"../../../lib" /FIXED:no
+# SUBTRACT LINK32 /debug /nodefaultlib
+
+!ELSEIF "$(CFG)" == "sessionControlS - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /WX /Gm /GR /GX /Zi /Od /I "." /I "../../../include" /I "../../include" /D "_CONSOLE" /D "_DEBUG" /D "WIN32_LEAN_AND_MEAN" /FD /GZ /c
+# SUBTRACT CPP /Fr /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 Iced.lib IceUtild.lib /nologo /subsystem:console /debug /machine:I386 /out:"server.exe" /pdbtype:sept /libpath:"../../../lib" /FIXED:no
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF
+
+# Begin Target
+
+# Name "sessionControlS - Win32 Release"
+# Name "sessionControlS - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\Session.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\SessionI.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;hm;inl"
+# Begin Source File
+
+SOURCE=.\Session.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\SessionI.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Session.ice
+
+!IF "$(CFG)" == "sessionControlS - Win32 Release"
+
+USERDEP__BACKE="..\..\..\bin\slice2cpp.exe" "..\..\..\lib\slice.lib"
+# Begin Custom Build
+InputPath=.\Session.ice
+
+BuildCmds= \
+ ..\..\..\bin\slice2cpp.exe -I../../../slice Session.ice
+
+"Session.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Session.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "sessionControlS - Win32 Debug"
+
+USERDEP__BACKE="..\..\..\bin\slice2cpp.exe" "..\..\..\lib\sliced.lib"
+# Begin Custom Build
+InputPath=.\Session.ice
+
+BuildCmds= \
+ ..\..\..\bin\slice2cpp.exe -I../../../slice Session.ice
+
+"Session.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Session.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
|