A pool of CMS sessions from the same connection and with the same acknowledge mode.
More...
#include <src/main/activemq/cmsutil/SessionPool.h>
A pool of CMS sessions from the same connection and with the same acknowledge mode.
Internal session resources are managed through a provided ResourceLifecycleManager
, not by this pool. This class is thread-safe.
◆ SessionPool()
Constructs a session pool.
- Parameters
-
connection | the connection to be used for creating all sessions. |
ackMode | the acknowledge mode to be used for all sessions |
resourceLifecycleManager | the object responsible for managing the lifecycle of any allocated cms::Session resources. |
◆ ~SessionPool()
virtual activemq::cmsutil::SessionPool::~SessionPool |
( |
| ) |
|
|
virtual |
Destroys the pooled session objects, but not the underlying session resources.
That is the job of the ResourceLifecycleManager.
◆ getResourceLifecycleManager()
◆ returnSession()
virtual void activemq::cmsutil::SessionPool::returnSession |
( |
PooledSession * | session | ) |
|
|
virtual |
Returns a session to the pool.
- Parameters
-
session | the session to be returned. |
◆ takeSession()
virtual PooledSession * activemq::cmsutil::SessionPool::takeSession |
( |
| ) |
|
|
virtual |
Takes a session from the pool, creating one if necessary.
- Returns
- the pooled session object
- Exceptions
-
CMSException | if an error occurred |
The documentation for this class was generated from the following file: