|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.joram.client.jms.Session
org.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
An XA Session actually wraps what looks like a "normal" session object. |
Fields inherited from class org.objectweb.joram.client.jms.Session |
messageListener |
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()
API method inherited from session, but intercepted here for adapting its behaviour to the XA context. |
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.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.MessageProducer |
createProducer(javax.jms.Destination dest)
Delegates the call to the wrapped JMS session. |
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()
API method inherited from session, but intercepted here for adapting its behaviour to the XA context. |
java.lang.String |
toString()
Returns a String image of this session. |
Methods inherited from class org.objectweb.joram.client.jms.Session |
createBytesMessage, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createQueue, createStreamMessage, createTemporaryQueue, createTemporaryTopic, createTextMessage, createTextMessage, createTopic, getAcknowledgeMode, getMessageListener, setMessageListener, setTransacted, unsubscribe |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.jms.Session |
createBytesMessage, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createQueue, createStreamMessage, createTemporaryQueue, createTemporaryTopic, createTextMessage, createTextMessage, createTopic, getAcknowledgeMode, getMessageListener, setMessageListener, unsubscribe |
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 java.lang.String toString()
toString
in class Session
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
getTransacted
in class Session
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
createBrowser
in class Session
javax.jms.JMSException
public javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue) throws javax.jms.JMSException
createBrowser
in interface javax.jms.Session
createBrowser
in class Session
javax.jms.JMSException
public javax.jms.MessageProducer createProducer(javax.jms.Destination dest) throws javax.jms.JMSException
createProducer
in interface javax.jms.Session
createProducer
in class Session
javax.jms.JMSException
- If the creation fails for any other reason.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
createConsumer
in class Session
javax.jms.JMSException
- If the creation fails for any other reason.public javax.jms.MessageConsumer createConsumer(javax.jms.Destination dest, java.lang.String selector) throws javax.jms.JMSException
createConsumer
in interface javax.jms.Session
createConsumer
in class Session
javax.jms.JMSException
- If the creation fails for any other reason.public javax.jms.MessageConsumer createConsumer(javax.jms.Destination dest) throws javax.jms.JMSException
createConsumer
in interface javax.jms.Session
createConsumer
in class Session
javax.jms.JMSException
- If the creation fails for any other reason.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
createDurableSubscriber
in class Session
javax.jms.JMSException
- If the creation fails for any other reason.public javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic, java.lang.String name) throws javax.jms.JMSException
createDurableSubscriber
in interface javax.jms.Session
createDurableSubscriber
in class Session
javax.jms.JMSException
- If the creation fails for any other reason.public void commit() throws javax.jms.JMSException
commit
in interface javax.jms.XASession
commit
in class Session
javax.jms.IllegalStateException
- Systematically thrown.
javax.jms.JMSException
public void rollback() throws javax.jms.JMSException
rollback
in interface javax.jms.XASession
rollback
in class Session
javax.jms.IllegalStateException
- Systematically thrown.
javax.jms.JMSException
public void recover() throws javax.jms.JMSException
recover
in interface javax.jms.Session
recover
in class Session
javax.jms.IllegalStateException
- Systematically thrown.
javax.jms.JMSException
public void close() throws javax.jms.JMSException
close
in interface javax.jms.Session
close
in class Session
javax.jms.JMSException
- Actually never thrown.public void run()
This method processes asynchronous deliveries coming from a connection consumer by passing them to the wrapped session.
run
in interface javax.jms.Session
run
in class Session
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |