summaryrefslogtreecommitdiff
path: root/java/demo/Database/library/LibraryI.java
diff options
context:
space:
mode:
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);
}