summaryrefslogtreecommitdiff
path: root/java/demo/Database/library/SQLRequestContext.java
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2008-08-20 16:35:18 -0700
committerMark Spruiell <mes@zeroc.com>2008-08-20 16:35:18 -0700
commita6a6a3af43c2676be8eb114d4e48c5a8e61c2614 (patch)
tree75547ef5ab7909cf337ffdf3dccd6de266f3a3db /java/demo/Database/library/SQLRequestContext.java
parentadd Glacier2 support. (diff)
downloadice-a6a6a3af43c2676be8eb114d4e48c5a8e61c2614.tar.bz2
ice-a6a6a3af43c2676be8eb114d4e48c5a8e61c2614.tar.xz
ice-a6a6a3af43c2676be8eb114d4e48c5a8e61c2614.zip
minor cleanup of JDBC demo
Diffstat (limited to 'java/demo/Database/library/SQLRequestContext.java')
-rw-r--r--java/demo/Database/library/SQLRequestContext.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/java/demo/Database/library/SQLRequestContext.java b/java/demo/Database/library/SQLRequestContext.java
index 226f8d50001..34274ecf2a9 100644
--- a/java/demo/Database/library/SQLRequestContext.java
+++ b/java/demo/Database/library/SQLRequestContext.java
@@ -7,8 +7,9 @@
//
// **********************************************************************
+//
// A SQL request context encapsulates SQL resources allocated in the
-// process a of executing a request, such as the database connection,
+// process of executing a request, such as the database connection,
// and associated SQL statements.
//
// The request context is automatically destroyed at the end of a
@@ -18,6 +19,7 @@
// When the request context is destroyed, the transaction is rolled
// back, if not already committed, and all allocated resources are
// released,
+//
class SQLRequestContext
{
public static SQLRequestContext
@@ -100,7 +102,7 @@ class SQLRequestContext
}
_pool.release(_conn);
-
+
_statements.clear();
_conn = null;
_pool = null;
@@ -152,7 +154,8 @@ class SQLRequestContext
}
// A map of threads to request contexts.
- private static java.util.Map<Thread, SQLRequestContext> _contextMap = new java.util.HashMap<Thread, SQLRequestContext>();
+ private static java.util.Map<Thread, SQLRequestContext> _contextMap =
+ new java.util.HashMap<Thread, SQLRequestContext>();
private Ice.Logger _logger;
private ConnectionPool _pool;