summaryrefslogtreecommitdiff
path: root/java/demo/Database/library/LibraryI.java
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2011-05-16 22:50:46 +0200
committerJose <jose@zeroc.com>2011-05-16 22:50:46 +0200
commit4a6b4173dbb9003c27cf85cdc9f34a1f61e42281 (patch)
tree8166e75fdf7d839e06e38f7fe04c4740b0cc8cac /java/demo/Database/library/LibraryI.java
parentReworked Windows README.txt (diff)
downloadice-4a6b4173dbb9003c27cf85cdc9f34a1f61e42281.tar.bz2
ice-4a6b4173dbb9003c27cf85cdc9f34a1f61e42281.tar.xz
ice-4a6b4173dbb9003c27cf85cdc9f34a1f61e42281.zip
4941 Library demo concurrency issues
Diffstat (limited to 'java/demo/Database/library/LibraryI.java')
-rw-r--r--java/demo/Database/library/LibraryI.java16
1 files changed, 4 insertions, 12 deletions
diff --git a/java/demo/Database/library/LibraryI.java b/java/demo/Database/library/LibraryI.java
index f44445e303c..1c4026e21cc 100644
--- a/java/demo/Database/library/LibraryI.java
+++ b/java/demo/Database/library/LibraryI.java
@@ -51,10 +51,7 @@ class LibraryI extends _LibraryDisp
}
if(next)
{
- // The SQLRequestContext is now owned by the query
- // implementation.
- context.obtain();
- BookQueryResultI impl = new BookQueryResultI(context, rs);
+ BookQueryResultI impl = new BookQueryResultI(context, rs, current.adapter);
result.value = BookQueryResultPrxHelper.uncheckedCast(current.adapter.addWithUUID(impl));
add(result.value, impl);
}
@@ -133,12 +130,10 @@ class LibraryI extends _LibraryDisp
first.value.add(BookI.extractDescription(context, rs, current.adapter));
next = rs.next();
}
+
if(next)
{
- // The SQLRequestContext is now owned by the query
- // implementation.
- context.obtain();
- BookQueryResultI impl = new BookQueryResultI(context, rs);
+ BookQueryResultI impl = new BookQueryResultI(context, rs, current.adapter);
result.value = BookQueryResultPrxHelper.uncheckedCast(current.adapter.addWithUUID(impl));
add(result.value, impl);
}
@@ -188,10 +183,7 @@ class LibraryI extends _LibraryDisp
}
if(next)
{
- // The SQLRequestContext is now owned by the query
- // implementation.
- context.obtain();
- BookQueryResultI impl = new BookQueryResultI(context, rs);
+ BookQueryResultI impl = new BookQueryResultI(context, rs, current.adapter);
result.value = BookQueryResultPrxHelper.uncheckedCast(current.adapter.addWithUUID(impl));
add(result.value, impl);
}