diff options
author | Matthew Newhook <matthew@zeroc.com> | 2009-09-09 15:11:18 -0230 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2009-09-09 15:11:18 -0230 |
commit | bbda11a7fdbcd6717029d4836e27931250d2360b (patch) | |
tree | a8ab1fe5377baa835c70e986c3313c169f53b362 /py/demo/Glacier2/callback/SessionServer.py | |
parent | Fixed bug 4146 - re-throwing exception with fillInStackTrace (diff) | |
download | ice-bbda11a7fdbcd6717029d4836e27931250d2360b.tar.bz2 ice-bbda11a7fdbcd6717029d4836e27931250d2360b.tar.xz ice-bbda11a7fdbcd6717029d4836e27931250d2360b.zip |
http://bugzilla/bugzilla/show_bug.cgi?id=2839
In the process of fixing this bug I added ice_ping to the Glacier2
router and updated the callback demo as described. I did not update
the VB demo/Glacier2/callback, nor the windows project files.
Diffstat (limited to 'py/demo/Glacier2/callback/SessionServer.py')
-rwxr-xr-x | py/demo/Glacier2/callback/SessionServer.py | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/py/demo/Glacier2/callback/SessionServer.py b/py/demo/Glacier2/callback/SessionServer.py deleted file mode 100755 index 0931a8096be..00000000000 --- a/py/demo/Glacier2/callback/SessionServer.py +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env python -# ********************************************************************** -# -# Copyright (c) 2003-2009 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. -# -# ********************************************************************** - -import sys, traceback, Ice, Glacier2 - -class DummyPermissionsVerifierI(Glacier2.PermissionsVerifier): - def checkPermissions(self, userId, password, current=None): - print "verified user `" + userId + "' with password `" + password + "'" - return (True, "") - -class SessionI(Glacier2.Session): - def __init__(self, userId): - self.userId = userId - - def destroy(self, current=None): - print "destroying session for user `" + self.userId + "'" - current.adapter.remove(current.id) - -class SessionManagerI(Glacier2.SessionManager): - def create(self, userId, control, current=None): - print "creating session for user `" + userId + "'" - session = SessionI(userId) - return Glacier2.SessionPrx.uncheckedCast(current.adapter.addWithUUID(session)) - -class SessionServer(Ice.Application): - def run(self, args): - if len(args) > 1: - print self.appName() + ": too many arguments" - return 1 - - adapter = self.communicator().createObjectAdapter("SessionServer") - adapter.add(DummyPermissionsVerifierI(), self.communicator().stringToIdentity("verifier")) - adapter.add(SessionManagerI(), self.communicator().stringToIdentity("sessionmanager")) - adapter.activate() - self.communicator().waitForShutdown() - return 0 - -app = SessionServer() -sys.exit(app.main(sys.argv, "config.sessionserver")) |