summaryrefslogtreecommitdiff
path: root/java/demo/Database/library/SessionFactoryI.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/demo/Database/library/SessionFactoryI.java')
-rw-r--r--java/demo/Database/library/SessionFactoryI.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/java/demo/Database/library/SessionFactoryI.java b/java/demo/Database/library/SessionFactoryI.java
new file mode 100644
index 00000000000..677a92078f2
--- /dev/null
+++ b/java/demo/Database/library/SessionFactoryI.java
@@ -0,0 +1,34 @@
+// **********************************************************************
+//
+// 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 SessionFactoryI extends _SessionFactoryDisp
+{
+ SessionFactoryI(Ice.Logger logger, ConnectionPool pool, ReapThread reaper)
+ {
+ _logger = logger;
+ _pool = pool;
+ _reaper = reaper;
+ }
+
+ public synchronized SessionPrx
+ create(Ice.Current c)
+ {
+ SessionI session = new SessionI(_pool, _logger, c.adapter);
+ SessionPrx proxy = SessionPrxHelper.uncheckedCast(c.adapter.addWithUUID(session));
+ _logger.trace("SessionFactory", "create new session: " + proxy.ice_getIdentity());
+ _reaper.add(proxy, session);
+ return proxy;
+ }
+
+ private Ice.Logger _logger;
+ private ConnectionPool _pool;
+ private ReapThread _reaper;
+}