summaryrefslogtreecommitdiff
path: root/cpp/demo/Database/Oracle/proc/CurrentSqlContext.pc
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2009-12-11 03:15:51 +0100
committerJose <jose@zeroc.com>2009-12-11 03:15:51 +0100
commit348eb362deeb1073df7172409e29d89e8ccdf160 (patch)
treee6c396970614683b2cfab3e43813f564c9ba07a0 /cpp/demo/Database/Oracle/proc/CurrentSqlContext.pc
parentbug 4355 - improve parse exception messages (diff)
downloadice-348eb362deeb1073df7172409e29d89e8ccdf160.tar.bz2
ice-348eb362deeb1073df7172409e29d89e8ccdf160.tar.xz
ice-348eb362deeb1073df7172409e29d89e8ccdf160.zip
4245 - Update oracle demos.
Diffstat (limited to 'cpp/demo/Database/Oracle/proc/CurrentSqlContext.pc')
-rw-r--r--cpp/demo/Database/Oracle/proc/CurrentSqlContext.pc24
1 files changed, 23 insertions, 1 deletions
diff --git a/cpp/demo/Database/Oracle/proc/CurrentSqlContext.pc b/cpp/demo/Database/Oracle/proc/CurrentSqlContext.pc
index 35e27fc3749..4bac89163a7 100644
--- a/cpp/demo/Database/Oracle/proc/CurrentSqlContext.pc
+++ b/cpp/demo/Database/Oracle/proc/CurrentSqlContext.pc
@@ -86,11 +86,33 @@ private:
}
+namespace
+{
+IceUtil::Mutex* _globalMutex = 0;
+class Init
+{
+public:
+
+ Init()
+ {
+ _globalMutex = new IceUtil::Mutex();
+ }
+
+ ~Init()
+ {
+ delete _globalMutex;
+ _globalMutex = 0;
+ }
+};
+
+Init init;
+}
+
CurrentSqlContext::CurrentSqlContext(const string& connectInfo) :
_connectInfo(connectInfo)
{
{
- IceUtil::StaticMutex::Lock lock(IceUtil::globalMutex);
+ IceUtil::Mutex::Lock lock(*_globalMutex);
_index = _currentIndex++;
}
_hook = new Notification(_index);