summaryrefslogtreecommitdiff
path: root/java/demo/Database/library/Server.java
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2008-08-18 14:22:36 -0230
committerMatthew Newhook <matthew@zeroc.com>2008-08-18 14:22:36 -0230
commitc9423fa34639713ca1b248551efca97e7f0eea12 (patch)
tree94808ca61debcd0bf29f622264b09eb4a0c91b53 /java/demo/Database/library/Server.java
parentSQL setup is now more automatic. (diff)
downloadice-c9423fa34639713ca1b248551efca97e7f0eea12.tar.bz2
ice-c9423fa34639713ca1b248551efca97e7f0eea12.tar.xz
ice-c9423fa34639713ca1b248551efca97e7f0eea12.zip
minor cleanups.
Diffstat (limited to 'java/demo/Database/library/Server.java')
-rw-r--r--java/demo/Database/library/Server.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/java/demo/Database/library/Server.java b/java/demo/Database/library/Server.java
index e279d4bed85..39cee6a0492 100644
--- a/java/demo/Database/library/Server.java
+++ b/java/demo/Database/library/Server.java
@@ -26,8 +26,8 @@ class LibraryServer extends Ice.Application
{
assert c.id.category.equals("library") || c.id.category.equals("book");
- // Setup new context.
- RequestContext context = new RequestContext(_logger, _pool);
+ // Setup the new SQL request context.
+ SQLRequestContext context = new SQLRequestContext(_logger, _pool);
if(c.id.category.equals("library"))
{
@@ -42,10 +42,13 @@ class LibraryServer extends Ice.Application
public void
finished(Ice.Current c, Ice.Object servant, Object cookie)
{
- RequestContext context = RequestContext.getCurrentContext();
+ // If a SQL request context is still associated with this
+ // request, then destroy it (it will not be associated if
+ // obtain was called).
+ SQLRequestContext context = SQLRequestContext.getCurrentContext();
if(context != null)
{
- context.releaseFromLocator();
+ context.destroyFromLocator();
}
}
@@ -56,6 +59,7 @@ class LibraryServer extends Ice.Application
private Ice.Logger _logger;
private ConnectionPool _pool;
+
private Ice.Object _bookServant;
private Ice.Object _libraryServant;
}