diff --git a/cpp/src/IceStorm/TopicI.cpp b/cpp/src/IceStorm/TopicI.cpp index 068f659..426513f 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) diff --git a/cpp/src/IceStorm/TopicManagerI.cpp b/cpp/src/IceStorm/TopicManagerI.cpp index d826c47..831a31a 100644 --- a/cpp/src/IceStorm/TopicManagerI.cpp +++ b/cpp/src/IceStorm/TopicManagerI.cpp @@ -312,7 +312,7 @@ TopicManagerImpl::TopicManagerImpl(const InstancePtr& instance) : _sync = _instance->nodeAdapter()->addWithUUID(_syncImpl); } - DatabaseConnectionPtr connection = _databaseCache->getConnection(); + DatabaseConnectionPtr connection = _databaseCache->newConnection(); // Ensure that the llu counter is present in the log. LLUWrapperPtr lluWrapper = _databaseCache->getLLU(connection); @@ -381,7 +381,7 @@ TopicManagerImpl::create(const string& name) { try { - DatabaseConnectionPtr connection = _databaseCache->getConnection(); + DatabaseConnectionPtr connection = _databaseCache->newConnection(); TransactionHolder txn(connection); SubscriberRecordKey key; @@ -486,7 +486,7 @@ TopicManagerImpl::observerInit(const LogUpdate& llu, const TopicContentSeq& cont { try { - DatabaseConnectionPtr connection = _databaseCache->getConnection(); + DatabaseConnectionPtr connection = _databaseCache->newConnection(); TransactionHolder txn(connection); LLUWrapperPtr lluWrapper = _databaseCache->getLLU(connection); @@ -590,7 +590,7 @@ TopicManagerImpl::observerCreateTopic(const LogUpdate& llu, const string& name) { try { - DatabaseConnectionPtr connection = _databaseCache->getConnection(); + DatabaseConnectionPtr connection = _databaseCache->newConnection(); TransactionHolder txn(connection); SubscriberRecordKey key; @@ -776,7 +776,7 @@ TopicManagerImpl::initMaster(const set& slaves, const LogUpdate& { content.clear(); - DatabaseConnectionPtr connection = _databaseCache->getConnection(); + DatabaseConnectionPtr connection = _databaseCache->newConnection(); TransactionHolder txn(connection); for(map::const_iterator p = _topics.begin(); p != _topics.end(); ++p)