|
Joram ${version} | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.joram.client.jms.XASession
Implements the javax.jms.XASession
interface.
An XA session actually extends the behaviour of a normal session by providing an XA resource representing it to a Transaction Manager, so that it is part of a distributed transaction. The XASession wraps what looks like a "normal"Session object. This object takes care of producing and consuming messages, the actual sendings and acknowledgement being managed by this XA wrapper.
Field Summary | |
protected Session |
sess
|
Fields inherited from interface javax.jms.Session |
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED |
Constructor Summary | |
XASession(Connection cnx,
Session sess,
XAResourceMngr rm)
Constructs an XASession . |
Method Summary | |
void |
close()
|
void |
commit()
API method inherited from session, but intercepted here for forbidding its use in the XA context (as defined by the API). |
javax.jms.QueueBrowser |
createBrowser(javax.jms.Queue queue)
Delegates the call to the wrapped JMS session. |
javax.jms.QueueBrowser |
createBrowser(javax.jms.Queue queue,
java.lang.String selector)
Delegates the call to the wrapped JMS session. |
javax.jms.BytesMessage |
createBytesMessage()
|
javax.jms.MessageConsumer |
createConsumer(javax.jms.Destination dest)
Delegates the call to the wrapped JMS session. |
javax.jms.MessageConsumer |
createConsumer(javax.jms.Destination dest,
java.lang.String selector)
Delegates the call to the wrapped JMS session. |
javax.jms.MessageConsumer |
createConsumer(javax.jms.Destination dest,
java.lang.String selector,
boolean noLocal)
Delegates the call to the wrapped JMS session. |
javax.jms.TopicSubscriber |
createDurableSubscriber(javax.jms.Topic topic,
java.lang.String name)
Delegates the call to the wrapped JMS session. |
javax.jms.TopicSubscriber |
createDurableSubscriber(javax.jms.Topic topic,
java.lang.String name,
java.lang.String selector,
boolean noLocal)
Delegates the call to the wrapped JMS session. |
javax.jms.MapMessage |
createMapMessage()
|
javax.jms.Message |
createMessage()
|
javax.jms.ObjectMessage |
createObjectMessage()
|
javax.jms.ObjectMessage |
createObjectMessage(java.io.Serializable obj)
|
javax.jms.MessageProducer |
createProducer(javax.jms.Destination dest)
Delegates the call to the wrapped JMS session. |
javax.jms.Queue |
createQueue(java.lang.String queueName)
|
javax.jms.StreamMessage |
createStreamMessage()
|
javax.jms.TemporaryQueue |
createTemporaryQueue()
|
javax.jms.TemporaryTopic |
createTemporaryTopic()
|
javax.jms.TextMessage |
createTextMessage()
|
javax.jms.TextMessage |
createTextMessage(java.lang.String text)
|
javax.jms.Topic |
createTopic(java.lang.String topicName)
|
int |
getAcknowledgeMode()
|
Session |
getDelegateSession()
|
javax.jms.MessageListener |
getMessageListener()
|
javax.jms.Session |
getSession()
API method. |
boolean |
getTransacted()
API method. |
javax.transaction.xa.XAResource |
getXAResource()
API method. |
void |
recover()
API method inherited from session, but intercepted here for forbidding its use in the XA context (as defined by the API). |
void |
rollback()
API method inherited from session, but intercepted here for forbidding its use in the XA context (as defined by the API). |
void |
run()
|
void |
setMessageListener(javax.jms.MessageListener messageListener)
|
java.lang.String |
toString()
Returns a String image of this session. |
void |
unsubscribe(java.lang.String name)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Session sess
Constructor Detail |
public XASession(Connection cnx, Session sess, XAResourceMngr rm) throws javax.jms.JMSException
XASession
.
This constructor is called by subclasses.
cnx
- The connection the session belongs to.sess
- The wrapped "regular" session.rm
- The resource manager.
javax.jms.JMSException
- Actually never thrown.Method Detail |
public final Session getDelegateSession()
public java.lang.String toString()
public javax.jms.Session getSession() throws javax.jms.JMSException
getSession
in interface javax.jms.XASession
javax.jms.IllegalStateException
- If the session is closed.
javax.jms.JMSException
public javax.transaction.xa.XAResource getXAResource()
getXAResource
in interface javax.jms.XASession
public boolean getTransacted() throws javax.jms.JMSException
getTransacted
in interface javax.jms.XASession
javax.jms.IllegalStateException
- If the session is closed.
javax.jms.JMSException
public javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue, java.lang.String selector) throws javax.jms.JMSException
createBrowser
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue) throws javax.jms.JMSException
createBrowser
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.MessageProducer createProducer(javax.jms.Destination dest) throws javax.jms.JMSException
createProducer
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.MessageConsumer createConsumer(javax.jms.Destination dest, java.lang.String selector, boolean noLocal) throws javax.jms.JMSException
createConsumer
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.MessageConsumer createConsumer(javax.jms.Destination dest, java.lang.String selector) throws javax.jms.JMSException
createConsumer
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.MessageConsumer createConsumer(javax.jms.Destination dest) throws javax.jms.JMSException
createConsumer
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic, java.lang.String name, java.lang.String selector, boolean noLocal) throws javax.jms.JMSException
createDurableSubscriber
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic, java.lang.String name) throws javax.jms.JMSException
createDurableSubscriber
in interface javax.jms.Session
javax.jms.JMSException
public void commit() throws javax.jms.JMSException
commit
in interface javax.jms.XASession
javax.jms.IllegalStateException
- Systematically thrown.
javax.jms.JMSException
public void rollback() throws javax.jms.JMSException
rollback
in interface javax.jms.XASession
javax.jms.IllegalStateException
- Systematically thrown.
javax.jms.JMSException
public void recover() throws javax.jms.JMSException
recover
in interface javax.jms.Session
javax.jms.IllegalStateException
- Systematically thrown.
javax.jms.JMSException
public void close() throws javax.jms.JMSException
close
in interface javax.jms.Session
javax.jms.JMSException
- Actually never thrown.public void run()
run
in interface javax.jms.Session
public void unsubscribe(java.lang.String name) throws javax.jms.JMSException
unsubscribe
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.TemporaryQueue createTemporaryQueue() throws javax.jms.JMSException
createTemporaryQueue
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.TemporaryTopic createTemporaryTopic() throws javax.jms.JMSException
createTemporaryTopic
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.Topic createTopic(java.lang.String topicName) throws javax.jms.JMSException
createTopic
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.Queue createQueue(java.lang.String queueName) throws javax.jms.JMSException
createQueue
in interface javax.jms.Session
javax.jms.JMSException
public void setMessageListener(javax.jms.MessageListener messageListener) throws javax.jms.JMSException
setMessageListener
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.MessageListener getMessageListener() throws javax.jms.JMSException
getMessageListener
in interface javax.jms.Session
javax.jms.JMSException
public int getAcknowledgeMode() throws javax.jms.JMSException
getAcknowledgeMode
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.TextMessage createTextMessage() throws javax.jms.JMSException
createTextMessage
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.TextMessage createTextMessage(java.lang.String text) throws javax.jms.JMSException
createTextMessage
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.StreamMessage createStreamMessage() throws javax.jms.JMSException
createStreamMessage
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.ObjectMessage createObjectMessage() throws javax.jms.JMSException
createObjectMessage
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.ObjectMessage createObjectMessage(java.io.Serializable obj) throws javax.jms.JMSException
createObjectMessage
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.Message createMessage() throws javax.jms.JMSException
createMessage
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.MapMessage createMapMessage() throws javax.jms.JMSException
createMapMessage
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.BytesMessage createBytesMessage() throws javax.jms.JMSException
createBytesMessage
in interface javax.jms.Session
javax.jms.JMSException
|
Joram ${version} | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |