public final class ActiveMQRASession extends Object implements javax.jms.QueueSession, javax.jms.TopicSession, javax.jms.XAQueueSession, javax.jms.XATopicSession
| Constructor and Description |
|---|
ActiveMQRASession(ActiveMQRAManagedConnection mc,
ActiveMQRAConnectionRequestInfo cri)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkState() |
void |
close()
Closes the session.
|
void |
commit()
Commit
|
javax.jms.QueueBrowser |
createBrowser(javax.jms.Queue queue)
Create a browser
|
javax.jms.QueueBrowser |
createBrowser(javax.jms.Queue queue,
String messageSelector)
Create a browser
|
javax.jms.BytesMessage |
createBytesMessage()
Create a bytes message
|
javax.jms.MessageConsumer |
createConsumer(javax.jms.Destination destination)
Create a message consumer
|
javax.jms.MessageConsumer |
createConsumer(javax.jms.Destination destination,
String messageSelector)
Create a message consumer
|
javax.jms.MessageConsumer |
createConsumer(javax.jms.Destination destination,
String messageSelector,
boolean noLocal)
Create a message consumer
|
javax.jms.MessageConsumer |
createDurableConsumer(javax.jms.Topic topic,
String name) |
javax.jms.MessageConsumer |
createDurableConsumer(javax.jms.Topic topic,
String name,
String messageSelector,
boolean noLocal) |
javax.jms.TopicSubscriber |
createDurableSubscriber(javax.jms.Topic topic,
String name)
Create a durable topic subscriber
|
javax.jms.TopicSubscriber |
createDurableSubscriber(javax.jms.Topic topic,
String name,
String messageSelector,
boolean noLocal)
Create a topic subscriber
|
javax.jms.MapMessage |
createMapMessage()
Create a map message
|
javax.jms.Message |
createMessage()
Create a message
|
javax.jms.ObjectMessage |
createObjectMessage()
Create an object message
|
javax.jms.ObjectMessage |
createObjectMessage(Serializable object)
Create an object message
|
javax.jms.MessageProducer |
createProducer(javax.jms.Destination destination)
Create a message producer
|
javax.jms.TopicPublisher |
createPublisher(javax.jms.Topic topic)
Create a topic publisher
|
javax.jms.Queue |
createQueue(String queueName)
Create a queue
|
javax.jms.QueueReceiver |
createReceiver(javax.jms.Queue queue)
Create a queue receiver
|
javax.jms.QueueReceiver |
createReceiver(javax.jms.Queue queue,
String messageSelector)
Create a queue receiver
|
javax.jms.QueueSender |
createSender(javax.jms.Queue queue)
Create a queue sender
|
javax.jms.MessageConsumer |
createSharedConsumer(javax.jms.Topic topic,
String sharedSubscriptionName) |
javax.jms.MessageConsumer |
createSharedConsumer(javax.jms.Topic topic,
String sharedSubscriptionName,
String messageSelector) |
javax.jms.MessageConsumer |
createSharedDurableConsumer(javax.jms.Topic topic,
String name) |
javax.jms.MessageConsumer |
createSharedDurableConsumer(javax.jms.Topic topic,
String name,
String messageSelector) |
javax.jms.StreamMessage |
createStreamMessage()
Create a stream message
|
javax.jms.TopicSubscriber |
createSubscriber(javax.jms.Topic topic)
Create a topic subscriber
|
javax.jms.TopicSubscriber |
createSubscriber(javax.jms.Topic topic,
String messageSelector,
boolean noLocal)
Create a topic subscriber
|
javax.jms.TemporaryQueue |
createTemporaryQueue()
Create a temporary queue
|
javax.jms.TemporaryTopic |
createTemporaryTopic()
Create a temporary topic
|
javax.jms.TextMessage |
createTextMessage()
Create a text message
|
javax.jms.TextMessage |
createTextMessage(String string)
Create a text message
|
javax.jms.Topic |
createTopic(String topicName)
Create a topic
|
int |
getAcknowledgeMode()
Get the acknowledge mode
|
javax.resource.spi.ManagedConnection |
getManagedConnection()
for tests only
|
javax.jms.MessageListener |
getMessageListener()
Get the message listener -- throws IllegalStateException
|
String |
getNodeId()
Returns the ID of the Node that this session is associated with.
|
javax.jms.QueueSession |
getQueueSession()
Get the queue session
|
javax.jms.Session |
getSession()
Get the session
|
javax.jms.TopicSession |
getTopicSession()
Get the topic session
|
boolean |
getTransacted()
Get transacted
|
XAResource |
getXAResource()
Get the XA resource
|
protected void |
lock()
Lock
|
void |
recover()
Recover
|
void |
rollback()
Rollback
|
void |
run()
Always throws an Error.
|
void |
setActiveMQSessionFactory(ActiveMQRASessionFactory sf)
Set the session factory
|
void |
setMessageListener(javax.jms.MessageListener listener)
Set the message listener -- Throws IllegalStateException
|
protected void |
unlock()
Unlock
|
void |
unsubscribe(String name)
Unsubscribe
|
public ActiveMQRASession(ActiveMQRAManagedConnection mc, ActiveMQRAConnectionRequestInfo cri)
mc - The managed connectioncri - The connection request infopublic void setActiveMQSessionFactory(ActiveMQRASessionFactory sf)
sf - The session factoryprotected void lock()
throws javax.jms.JMSException
javax.jms.JMSException - Thrown if an error occursjavax.jms.IllegalStateException - The session is closedprotected void unlock()
public javax.jms.BytesMessage createBytesMessage()
throws javax.jms.JMSException
createBytesMessage in interface javax.jms.Sessionjavax.jms.JMSException - Thrown if an error occurspublic javax.jms.MapMessage createMapMessage()
throws javax.jms.JMSException
createMapMessage in interface javax.jms.Sessionjavax.jms.JMSException - Thrown if an error occurspublic javax.jms.Message createMessage()
throws javax.jms.JMSException
createMessage in interface javax.jms.Sessionjavax.jms.JMSException - Thrown if an error occurspublic javax.jms.ObjectMessage createObjectMessage()
throws javax.jms.JMSException
createObjectMessage in interface javax.jms.Sessionjavax.jms.JMSException - Thrown if an error occurspublic javax.jms.ObjectMessage createObjectMessage(Serializable object) throws javax.jms.JMSException
createObjectMessage in interface javax.jms.Sessionobject - The objectjavax.jms.JMSException - Thrown if an error occurspublic javax.jms.StreamMessage createStreamMessage()
throws javax.jms.JMSException
createStreamMessage in interface javax.jms.Sessionjavax.jms.JMSException - Thrown if an error occurspublic javax.jms.TextMessage createTextMessage()
throws javax.jms.JMSException
createTextMessage in interface javax.jms.Sessionjavax.jms.JMSException - Thrown if an error occurspublic javax.jms.TextMessage createTextMessage(String string) throws javax.jms.JMSException
createTextMessage in interface javax.jms.Sessionstring - The textjavax.jms.JMSException - Thrown if an error occurspublic boolean getTransacted()
throws javax.jms.JMSException
getTransacted in interface javax.jms.SessiongetTransacted in interface javax.jms.XASessionjavax.jms.JMSException - Thrown if an error occurspublic javax.jms.MessageListener getMessageListener()
throws javax.jms.JMSException
getMessageListener in interface javax.jms.Sessionjavax.jms.JMSException - Thrown if an error occurspublic void setMessageListener(javax.jms.MessageListener listener)
throws javax.jms.JMSException
setMessageListener in interface javax.jms.Sessionlistener - The message listenerjavax.jms.JMSException - Thrown if an error occurspublic void run()
public void close()
throws javax.jms.JMSException
close in interface javax.jms.Sessionjavax.jms.JMSException - Failed to close session.public void commit()
throws javax.jms.JMSException
commit in interface javax.jms.Sessioncommit in interface javax.jms.XASessionjavax.jms.JMSException - Failed to close session.public void rollback()
throws javax.jms.JMSException
rollback in interface javax.jms.Sessionrollback in interface javax.jms.XASessionjavax.jms.JMSException - Failed to close session.public void recover()
throws javax.jms.JMSException
recover in interface javax.jms.Sessionjavax.jms.JMSException - Failed to close session.public javax.jms.Topic createTopic(String topicName) throws javax.jms.JMSException
createTopic in interface javax.jms.SessioncreateTopic in interface javax.jms.TopicSessiontopicName - The topic namejavax.jms.JMSException - Thrown if an error occurspublic javax.jms.TopicSubscriber createSubscriber(javax.jms.Topic topic)
throws javax.jms.JMSException
createSubscriber in interface javax.jms.TopicSessiontopic - The topicjavax.jms.JMSException - Thrown if an error occurspublic javax.jms.TopicSubscriber createSubscriber(javax.jms.Topic topic,
String messageSelector,
boolean noLocal)
throws javax.jms.JMSException
createSubscriber in interface javax.jms.TopicSessiontopic - The topicmessageSelector - The message selectornoLocal - If true inhibits the delivery of messages published by its own connectionjavax.jms.JMSException - Thrown if an error occurspublic javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic,
String name)
throws javax.jms.JMSException
createDurableSubscriber in interface javax.jms.SessioncreateDurableSubscriber in interface javax.jms.TopicSessiontopic - The topicname - The namejavax.jms.JMSException - Thrown if an error occurspublic javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic,
String name,
String messageSelector,
boolean noLocal)
throws javax.jms.JMSException
createDurableSubscriber in interface javax.jms.SessioncreateDurableSubscriber in interface javax.jms.TopicSessiontopic - The topicname - The namemessageSelector - The message selectornoLocal - If true inhibits the delivery of messages published by its own connectionjavax.jms.JMSException - Thrown if an error occurspublic javax.jms.TopicPublisher createPublisher(javax.jms.Topic topic)
throws javax.jms.JMSException
createPublisher in interface javax.jms.TopicSessiontopic - The topicjavax.jms.JMSException - Thrown if an error occurspublic javax.jms.TemporaryTopic createTemporaryTopic()
throws javax.jms.JMSException
createTemporaryTopic in interface javax.jms.SessioncreateTemporaryTopic in interface javax.jms.TopicSessionjavax.jms.JMSException - Thrown if an error occurspublic void unsubscribe(String name) throws javax.jms.JMSException
unsubscribe in interface javax.jms.Sessionunsubscribe in interface javax.jms.TopicSessionname - The namejavax.jms.JMSException - Thrown if an error occurspublic javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue)
throws javax.jms.JMSException
createBrowser in interface javax.jms.QueueSessioncreateBrowser in interface javax.jms.Sessionqueue - The queuejavax.jms.JMSException - Thrown if an error occurspublic javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue,
String messageSelector)
throws javax.jms.JMSException
createBrowser in interface javax.jms.QueueSessioncreateBrowser in interface javax.jms.Sessionqueue - The queuemessageSelector - The message selectorjavax.jms.JMSException - Thrown if an error occurspublic javax.jms.Queue createQueue(String queueName) throws javax.jms.JMSException
createQueue in interface javax.jms.QueueSessioncreateQueue in interface javax.jms.SessionqueueName - The queue namejavax.jms.JMSException - Thrown if an error occurspublic javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue)
throws javax.jms.JMSException
createReceiver in interface javax.jms.QueueSessionqueue - The queuejavax.jms.JMSException - Thrown if an error occurspublic javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue,
String messageSelector)
throws javax.jms.JMSException
createReceiver in interface javax.jms.QueueSessionqueue - The queuemessageSelector - javax.jms.JMSException - Thrown if an error occurspublic javax.jms.QueueSender createSender(javax.jms.Queue queue)
throws javax.jms.JMSException
createSender in interface javax.jms.QueueSessionqueue - The queuejavax.jms.JMSException - Thrown if an error occurspublic javax.jms.TemporaryQueue createTemporaryQueue()
throws javax.jms.JMSException
createTemporaryQueue in interface javax.jms.QueueSessioncreateTemporaryQueue in interface javax.jms.Sessionjavax.jms.JMSException - Thrown if an error occurspublic javax.jms.MessageConsumer createConsumer(javax.jms.Destination destination)
throws javax.jms.JMSException
createConsumer in interface javax.jms.Sessiondestination - The destinationjavax.jms.JMSException - Thrown if an error occurspublic javax.jms.MessageConsumer createConsumer(javax.jms.Destination destination,
String messageSelector)
throws javax.jms.JMSException
createConsumer in interface javax.jms.Sessiondestination - The destinationmessageSelector - The message selectorjavax.jms.JMSException - Thrown if an error occurspublic javax.jms.MessageConsumer createConsumer(javax.jms.Destination destination,
String messageSelector,
boolean noLocal)
throws javax.jms.JMSException
createConsumer in interface javax.jms.Sessiondestination - The destinationmessageSelector - The message selectornoLocal - If true inhibits the delivery of messages published by its own connectionjavax.jms.JMSException - Thrown if an error occurspublic javax.jms.MessageProducer createProducer(javax.jms.Destination destination)
throws javax.jms.JMSException
createProducer in interface javax.jms.Sessiondestination - The destinationjavax.jms.JMSException - Thrown if an error occurspublic int getAcknowledgeMode()
throws javax.jms.JMSException
getAcknowledgeMode in interface javax.jms.Sessionjavax.jms.JMSException - Thrown if an error occurspublic XAResource getXAResource()
getXAResource in interface javax.jms.XASessionjavax.jms.IllegalStateException - If non XA connectionpublic String getNodeId() throws javax.jms.JMSException
javax.jms.JMSExceptionpublic javax.jms.Session getSession()
throws javax.jms.JMSException
getSession in interface javax.jms.XASessionjavax.jms.JMSException - Thrown if an error occurspublic javax.jms.QueueSession getQueueSession()
throws javax.jms.JMSException
getQueueSession in interface javax.jms.XAQueueSessionjavax.jms.JMSException - Thrown if an error occurspublic javax.jms.TopicSession getTopicSession()
throws javax.jms.JMSException
getTopicSession in interface javax.jms.XATopicSessionjavax.jms.JMSException - Thrown if an error occurspublic javax.jms.MessageConsumer createSharedConsumer(javax.jms.Topic topic,
String sharedSubscriptionName)
throws javax.jms.JMSException
createSharedConsumer in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.jms.MessageConsumer createSharedConsumer(javax.jms.Topic topic,
String sharedSubscriptionName,
String messageSelector)
throws javax.jms.JMSException
createSharedConsumer in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.jms.MessageConsumer createDurableConsumer(javax.jms.Topic topic,
String name)
throws javax.jms.JMSException
createDurableConsumer in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.jms.MessageConsumer createDurableConsumer(javax.jms.Topic topic,
String name,
String messageSelector,
boolean noLocal)
throws javax.jms.JMSException
createDurableConsumer in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.jms.MessageConsumer createSharedDurableConsumer(javax.jms.Topic topic,
String name)
throws javax.jms.JMSException
createSharedDurableConsumer in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.jms.MessageConsumer createSharedDurableConsumer(javax.jms.Topic topic,
String name,
String messageSelector)
throws javax.jms.JMSException
createSharedDurableConsumer in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.resource.spi.ManagedConnection getManagedConnection()
public void checkState()
throws javax.jms.JMSException
SystemExceptionRollbackExceptionjavax.jms.JMSExceptionCopyright © 2015 The Apache Software Foundation. All Rights Reserved.