diff options
author | Matthew Newhook <matthew@zeroc.com> | 2008-08-18 15:48:25 -0230 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2008-08-18 15:48:25 -0230 |
commit | a4e40d81fd417c1f9b3a158a368f3e700afebe0c (patch) | |
tree | 0b23a29f4849c0e219c5d2973b0e453cf4744594 /java/demo/Database/library/Glacier2SessionManagerI.java | |
parent | minor cleanups. (diff) | |
download | ice-a4e40d81fd417c1f9b3a158a368f3e700afebe0c.tar.bz2 ice-a4e40d81fd417c1f9b3a158a368f3e700afebe0c.tar.xz ice-a4e40d81fd417c1f9b3a158a368f3e700afebe0c.zip |
add Glacier2 support.
Diffstat (limited to 'java/demo/Database/library/Glacier2SessionManagerI.java')
-rw-r--r-- | java/demo/Database/library/Glacier2SessionManagerI.java | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/java/demo/Database/library/Glacier2SessionManagerI.java b/java/demo/Database/library/Glacier2SessionManagerI.java new file mode 100644 index 00000000000..8e36b88a681 --- /dev/null +++ b/java/demo/Database/library/Glacier2SessionManagerI.java @@ -0,0 +1,33 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2008 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 Demo.*; + +class Glacier2SessionManagerI extends Glacier2._SessionManagerDisp +{ + public Glacier2.SessionPrx + create(String userId, Glacier2.SessionControlPrx control, Ice.Current c) + { + SessionI session = new SessionI(_logger, c.adapter); + _Glacier2SessionTie servant = new _Glacier2SessionTie(session); + Glacier2.SessionPrx proxy = Glacier2.SessionPrxHelper.uncheckedCast(c.adapter.addWithUUID(servant)); + _logger.trace("SessionFactory", "create new session: " + proxy.ice_getIdentity()); + _reaper.add(proxy, session); + return proxy; + } + + Glacier2SessionManagerI(Ice.Logger logger, ReapThread reaper) + { + _logger = logger; + _reaper = reaper; + } + + private Ice.Logger _logger; + private ReapThread _reaper; +} |