diff options
author | Matthew Newhook <matthew@zeroc.com> | 2008-08-21 09:46:47 -0230 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2008-08-21 09:46:47 -0230 |
commit | 182520ac63c6ab50a5d7053cefdef96814f812b1 (patch) | |
tree | 7f0578004cb889723f91f96323ce867bcb9aab29 /java/demo/Database/library/SQLRequestContext.java | |
parent | Merge branch 'R3_3_branch' (diff) | |
download | ice-182520ac63c6ab50a5d7053cefdef96814f812b1.tar.bz2 ice-182520ac63c6ab50a5d7053cefdef96814f812b1.tar.xz ice-182520ac63c6ab50a5d7053cefdef96814f812b1.zip |
fixes.
Diffstat (limited to 'java/demo/Database/library/SQLRequestContext.java')
-rw-r--r-- | java/demo/Database/library/SQLRequestContext.java | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/java/demo/Database/library/SQLRequestContext.java b/java/demo/Database/library/SQLRequestContext.java index 34274ecf2a9..e6775ffa529 100644 --- a/java/demo/Database/library/SQLRequestContext.java +++ b/java/demo/Database/library/SQLRequestContext.java @@ -27,13 +27,7 @@ class SQLRequestContext { synchronized(_contextMap) { - SQLRequestContext context = _contextMap.get(Thread.currentThread()); - if(context != null) - { - //context._logger.trace("SQLRequestContext", "getCurrentContext: thread " + Thread.currentThread() + - //": connection: " + context._conn); - } - return context; + return _contextMap.get(Thread.currentThread()); } } @@ -64,7 +58,6 @@ class SQLRequestContext // Remove the current context from the map. synchronized(_contextMap) { - //_logger.trace("SQLRequestContext", "obtain: connection: " + _conn); _contextMap.remove(Thread.currentThread()); } } @@ -78,15 +71,12 @@ class SQLRequestContext assert context == null; } - //_logger.trace("SQLRequestContext", "destroy: connection: " + _conn); - // Release all resources. try { // Rollback the transaction if it was not committed. if(!_commit) { - //_logger.trace("SQLRequestContext", "rollback: thread " + Thread.currentThread() + ": connection: " + _conn); _conn.rollback(); } @@ -113,7 +103,6 @@ class SQLRequestContext throws java.sql.SQLException { _conn.commit(); - //_logger.trace("SQLRequestContext", "commit: thread " + Thread.currentThread() + ": connection: " + _conn); _commit = true; } @@ -124,7 +113,6 @@ class SQLRequestContext _conn = pool.acquire(); synchronized(_contextMap) { - //_logger.trace("SQLRequestContext", "associate: thread " + Thread.currentThread() + ": connection: " + _conn); _contextMap.put(Thread.currentThread(), this); } } @@ -135,7 +123,6 @@ class SQLRequestContext { synchronized(_contextMap) { - //_logger.trace("SQLRequestContext", "release: connection: " + _conn); // Remove the current context from the map. SQLRequestContext context = _contextMap.remove(Thread.currentThread()); assert context == this; |