summaryrefslogtreecommitdiff
path: root/cpp/src/IceStorm/TopicI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2011-10-31 16:07:55 +0100
committerBenoit Foucher <benoit@zeroc.com>2011-10-31 16:07:55 +0100
commita969a38974c6469edcc573e25e46512d564911e8 (patch)
tree05e619722d90f5853ed5a2a1f4f6dd1a0b8b359a /cpp/src/IceStorm/TopicI.cpp
parentGlacier2 Session Helper implementation (diff)
downloadice-a969a38974c6469edcc573e25e46512d564911e8.tar.bz2
ice-a969a38974c6469edcc573e25e46512d564911e8.tar.xz
ice-a969a38974c6469edcc573e25e46512d564911e8.zip
Fixed ICE-4727, create new connection for each request instead of re-using the same connection
Diffstat (limited to 'cpp/src/IceStorm/TopicI.cpp')
-rw-r--r--cpp/src/IceStorm/TopicI.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/cpp/src/IceStorm/TopicI.cpp b/cpp/src/IceStorm/TopicI.cpp
index 068f659bd66..426513f6c54 100644
--- a/cpp/src/IceStorm/TopicI.cpp
+++ b/cpp/src/IceStorm/TopicI.cpp
@@ -666,7 +666,7 @@ TopicImpl::subscribe(const QoS& origQoS, const Ice::ObjectPrx& obj)
{
try
{
- DatabaseConnectionPtr connection = _databaseCache->getConnection();
+ DatabaseConnectionPtr connection = _databaseCache->newConnection();
TransactionHolder txn(connection);
SubscriberRecordKey key;
@@ -703,7 +703,7 @@ TopicImpl::subscribe(const QoS& origQoS, const Ice::ObjectPrx& obj)
{
try
{
- DatabaseConnectionPtr connection = _databaseCache->getConnection();
+ DatabaseConnectionPtr connection = _databaseCache->newConnection();
TransactionHolder txn(connection);
SubscriberRecordKey key;
@@ -788,7 +788,7 @@ TopicImpl::subscribeAndGetPublisher(const QoS& qos, const Ice::ObjectPrx& obj)
{
try
{
- DatabaseConnectionPtr connection = _databaseCache->getConnection();
+ DatabaseConnectionPtr connection = _databaseCache->newConnection();
TransactionHolder txn(connection);
SubscriberRecordKey key;
@@ -912,7 +912,7 @@ TopicImpl::link(const TopicPrx& topic, Ice::Int cost)
{
try
{
- DatabaseConnectionPtr connection = _databaseCache->getConnection();
+ DatabaseConnectionPtr connection = _databaseCache->newConnection();
TransactionHolder txn(connection);
SubscriberRecordKey key;
@@ -1311,7 +1311,7 @@ TopicImpl::observerAddSubscriber(const LogUpdate& llu, const SubscriberRecord& r
{
try
{
- DatabaseConnectionPtr connection = _databaseCache->getConnection();
+ DatabaseConnectionPtr connection = _databaseCache->newConnection();
TransactionHolder txn(connection);
SubscriberRecordKey key;
@@ -1380,7 +1380,7 @@ TopicImpl::observerRemoveSubscriber(const LogUpdate& llu, const Ice::IdentitySeq
{
try
{
- DatabaseConnectionPtr connection = _databaseCache->getConnection();
+ DatabaseConnectionPtr connection = _databaseCache->newConnection();
TransactionHolder txn(connection);
for(Ice::IdentitySeq::const_iterator id = ids.begin(); id != ids.end(); ++id)
@@ -1456,7 +1456,7 @@ TopicImpl::destroyInternal(const LogUpdate& origLLU, bool master)
{
try
{
- DatabaseConnectionPtr connection = _databaseCache->getConnection();
+ DatabaseConnectionPtr connection = _databaseCache->newConnection();
TransactionHolder txn(connection);
// Erase all subscriber records and the topic record.
@@ -1531,7 +1531,7 @@ TopicImpl::removeSubscribers(const Ice::IdentitySeq& ids)
{
try
{
- DatabaseConnectionPtr connection = _databaseCache->getConnection();
+ DatabaseConnectionPtr connection = _databaseCache->newConnection();
TransactionHolder txn(connection);
for(Ice::IdentitySeq::const_iterator id = ids.begin(); id != ids.end(); ++id)