activemq-cpp-3.4.0
|
The XAConnectionFactory interface is specialized interface that defines an ConnectionFactory that creates Connection instance that will participate in XA Transactions. More...
#include <src/main/cms/XAConnectionFactory.h>
Public Member Functions | |
virtual | ~XAConnectionFactory () |
virtual XAConnection * | createXAConnection ()=0 |
Creates an XAConnection with the default user name and password. | |
virtual XAConnection * | createXAConnection (const std::string &userName, const std::string &password)=0 |
Creates an XA connection with the specified user name and password. | |
Static Public Member Functions | |
static XAConnectionFactory * | createCMSXAConnectionFactory (const std::string &brokerURI) |
Static method that is used to create a provider specific XA Connection factory. |
The XAConnectionFactory interface is specialized interface that defines an ConnectionFactory that creates Connection instance that will participate in XA Transactions.
Some application provide support for grouping XA capable resource use into a distributed transaction (optional). To include CMS API transactions in a XA transaction, an application requires a XA aware library. A CMS provider exposes its XA support using an XAConnectionFactory object, which an application uses to create XAConnection objects.
The XAConnectionFactory interface is optional. CMS providers are not required to support this interface. This interface is for use by CMS providers to support transactional environments. Client programs are strongly encouraged to use the transactional support available in their environment, rather than use these XA interfaces directly.
virtual cms::XAConnectionFactory::~XAConnectionFactory | ( | ) | [virtual] |
static XAConnectionFactory* cms::XAConnectionFactory::createCMSXAConnectionFactory | ( | const std::string & | brokerURI | ) | [static] |
Static method that is used to create a provider specific XA Connection factory.
The provider implements this method in their library and returns an instance of a XAConnectionFactory derived object. Clients can use this method to remain abstracted from the specific CMS implementation being used.
The XA interfaces are optional in CMS however if a provider chooses to omit them it should still override this method and throw an UnsupportedOperationException to indicate that it doesn't provide this functionality.
brokerURI | The remote address to use to connect to the Provider. |
CMSException | if an internal error occurs while creating the XAConnectionFactory. |
UnsupportedOperationException | if the provider does not support the XA API. |
virtual XAConnection* cms::XAConnectionFactory::createXAConnection | ( | ) | [pure virtual] |
Creates an XAConnection with the default user name and password.
The connection is created in stopped mode just as the standard Connection object is created from the ConnectionFactory. No messages will be delivered until the Connection.start method is explicitly called.
CMSException | if an internal error occurs while creating the Connection. |
CMSSecurityException | if the client authentication fails because the user name or password are invalid. |
Implemented in activemq::core::ActiveMQXAConnectionFactory.
virtual XAConnection* cms::XAConnectionFactory::createXAConnection | ( | const std::string & | userName, |
const std::string & | password | ||
) | [pure virtual] |
Creates an XA connection with the specified user name and password.
The connection is created in stopped mode just as the standard ConnectionFactory creates a new Connection. No messages will be delivered until the Connection.start method is explicitly called.
CMSException | if an internal error occurs while creating the Connection. |
CMSSecurityException | if the client authentication fails because the user name or password are invalid. |
Implemented in activemq::core::ActiveMQXAConnectionFactory.