You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Ivan Pechorin (JIRA)" <ji...@apache.org> on 2010/02/24 09:44:40 UTC
[jira] Updated: (AMQCPP-288) ResourceLifecycleManager needs to be
thread-safe
[ https://issues.apache.org/activemq/browse/AMQCPP-288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ivan Pechorin updated AMQCPP-288:
---------------------------------
Attachment: AMQCPP_288_trunk.patch
Here is a patch, prepared against current trunk; same patch builds fine against version 3.1.0.
Thread safety could be added by a smaller patch (just adding few mutexes), but I replace std::vector with decaf::util::StlList because it looks more consistent with other parts of ActiveMQ C++ client code.
> ResourceLifecycleManager needs to be thread-safe
> ------------------------------------------------
>
> Key: AMQCPP-288
> URL: https://issues.apache.org/activemq/browse/AMQCPP-288
> Project: ActiveMQ C++ Client
> Issue Type: Bug
> Components: CMS Impl
> Affects Versions: 3.0.1, 3.1
> Reporter: Ivan Pechorin
> Assignee: Timothy Bish
> Attachments: AMQCPP_288_trunk.patch
>
>
> We use ActiveMQ C++ 3.x client in a multi-threaded application. In particular, we use activemq::cmsutil::SessionPool and activemq::cmsutil::PooledSession.
> Methods createCachedProducer and createCachedConsumer of class PooledSession do not synchronize access to their shared ResourceLifecycleManager, and ResourceLifecycleManager itself is not thread-safe. Therefore, it is not safe to use pooled session from multiple threads, even if we guarantee that each PooledSession is used from one thread at any given time.
> To resolve this issue, ResourceLifecycleManager needs to be thread-safe, i.e. we need to add synchronization to all of its add* methods.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.