activemq-cpp-3.6.0
activemq::core::ActiveMQXASession Class Reference

#include <src/main/activemq/core/ActiveMQXASession.h>

Inheritance diagram for activemq::core::ActiveMQXASession:

Public Member Functions

 ActiveMQXASession (Pointer< activemq::core::kernels::ActiveMQXASessionKernel > kernel)
virtual ~ActiveMQXASession ()
virtual bool isTransacted () const
 Gets if the Sessions is a Transacted Session.
virtual bool isAutoAcknowledge () const
virtual void doStartTransaction ()
virtual void commit ()
 Commits all messages done in this transaction and releases any locks currently held.
virtual void rollback ()
 Rolls back all messages done in this transaction and releases any locks currently held.
virtual cms::XAResourcegetXAResource () const
 Returns the XA resource associated with this Session to the caller.
- Public Member Functions inherited from cms::XASession
virtual ~XASession ()
- Public Member Functions inherited from cms::Session
virtual ~Session ()
- Public Member Functions inherited from cms::Closeable
virtual ~Closeable ()
- Public Member Functions inherited from cms::Startable
virtual ~Startable ()
- Public Member Functions inherited from cms::Stoppable
virtual ~Stoppable ()
- Public Member Functions inherited from activemq::core::ActiveMQSession
 ActiveMQSession (Pointer< activemq::core::kernels::ActiveMQSessionKernel > kernel)
virtual ~ActiveMQSession ()
virtual void start ()
 Stops asynchronous message delivery.
virtual void stop ()
 Starts asynchronous message delivery.
bool isStarted () const
 Indicates whether or not the session is currently in the started state.
virtual void close ()
 Closes this session as well as any active child consumers or producers.
virtual void recover ()
 Stops message delivery in this session, and restarts message delivery with the oldest unacknowledged message.
virtual cms::MessageConsumercreateConsumer (const cms::Destination *destination)
 Creates a MessageConsumer for the specified destination.
virtual cms::MessageConsumercreateConsumer (const cms::Destination *destination, const std::string &selector)
 Creates a MessageConsumer for the specified destination, using a message selector.
virtual cms::MessageConsumercreateConsumer (const cms::Destination *destination, const std::string &selector, bool noLocal)
 Creates a MessageConsumer for the specified destination, using a message selector.
virtual cms::MessageConsumercreateDurableConsumer (const cms::Topic *destination, const std::string &name, const std::string &selector, bool noLocal=false)
 Creates a durable subscriber to the specified topic, using a Message selector.
virtual cms::MessageProducercreateProducer (const cms::Destination *destination)
 Creates a MessageProducer to send messages to the specified destination.
virtual cms::QueueBrowsercreateBrowser (const cms::Queue *queue)
 Creates a new QueueBrowser to peek at Messages on the given Queue.
virtual cms::QueueBrowsercreateBrowser (const cms::Queue *queue, const std::string &selector)
 Creates a new QueueBrowser to peek at Messages on the given Queue.
virtual cms::QueuecreateQueue (const std::string &queueName)
 Creates a queue identity given a Queue name.
virtual cms::TopiccreateTopic (const std::string &topicName)
 Creates a topic identity given a Queue name.
virtual cms::TemporaryQueuecreateTemporaryQueue ()
 Creates a TemporaryQueue object.
virtual cms::TemporaryTopiccreateTemporaryTopic ()
 Creates a TemporaryTopic object.
virtual cms::MessagecreateMessage ()
 Creates a new Message.
virtual cms::BytesMessagecreateBytesMessage ()
 Creates a BytesMessage.
virtual cms::BytesMessagecreateBytesMessage (const unsigned char *bytes, int bytesSize)
 Creates a BytesMessage and sets the payload to the passed value.
virtual cms::StreamMessagecreateStreamMessage ()
 Creates a new StreamMessage.
virtual cms::TextMessagecreateTextMessage ()
 Creates a new TextMessage.
virtual cms::TextMessagecreateTextMessage (const std::string &text)
 Creates a new TextMessage and set the text to the value given.
virtual cms::MapMessagecreateMapMessage ()
 Creates a new MapMessage.
virtual
cms::Session::AcknowledgeMode 
getAcknowledgeMode () const
 Returns the acknowledgment mode of the session.
virtual void unsubscribe (const std::string &name)
 Unsubscribes a durable subscription that has been created by a client.
cms::ExceptionListenergetExceptionListener ()
 This method gets any registered exception listener of this sessions connection and returns it.
virtual void setMessageTransformer (cms::MessageTransformer *transformer)
 Set an MessageTransformer instance that is passed on to all MessageProducer and MessageConsumer objects created from this Session.
virtual cms::MessageTransformergetMessageTransformer () const
 Gets the currently configured MessageTransformer for this Session.
const commands::SessionInfogetSessionInfo () const
 Gets the Session Information object for this session, if the session is closed than this method throws an exception.
const commands::SessionIdgetSessionId () const
 Gets the Session Id object for this session, if the session is closed than this method throws an exception.
ActiveMQConnectiongetConnection () const
 Gets the ActiveMQConnection that is associated with this session.

Additional Inherited Members

- Public Types inherited from cms::Session
enum  AcknowledgeMode {
  AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, SESSION_TRANSACTED,
  INDIVIDUAL_ACKNOWLEDGE
}
- Protected Attributes inherited from activemq::core::ActiveMQSession
Pointer
< activemq::core::kernels::ActiveMQSessionKernel
kernel

Constructor & Destructor Documentation

activemq::core::ActiveMQXASession::ActiveMQXASession ( Pointer< activemq::core::kernels::ActiveMQXASessionKernel kernel)
virtual activemq::core::ActiveMQXASession::~ActiveMQXASession ( )
virtual

Member Function Documentation

virtual void activemq::core::ActiveMQXASession::commit ( )
virtual

Commits all messages done in this transaction and releases any locks currently held.

Exceptions
CMSException- If an internal error occurs.
IllegalStateException- if the method is not called by a transacted session.

Reimplemented from activemq::core::ActiveMQSession.

virtual void activemq::core::ActiveMQXASession::doStartTransaction ( )
virtual
virtual cms::XAResource* activemq::core::ActiveMQXASession::getXAResource ( ) const
virtual

Returns the XA resource associated with this Session to the caller.

The client can use the provided XA resource to interact with the XA Transaction Manager in use in the client application.

Returns
an XAResouce instance to the caller, the caller does not own this pointer and should not delete it.

Implements cms::XASession.

virtual bool activemq::core::ActiveMQXASession::isAutoAcknowledge ( ) const
virtual
virtual bool activemq::core::ActiveMQXASession::isTransacted ( ) const
virtual

Gets if the Sessions is a Transacted Session.

Returns
transacted true - false.
Exceptions
CMSException- If an internal error occurs.

Reimplemented from activemq::core::ActiveMQSession.

virtual void activemq::core::ActiveMQXASession::rollback ( )
virtual

Rolls back all messages done in this transaction and releases any locks currently held.

Exceptions
CMSException- If an internal error occurs.
IllegalStateException- if the method is not called by a transacted session.

Reimplemented from activemq::core::ActiveMQSession.


The documentation for this class was generated from the following file: