|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.mq.jms.MQSession | +--com.ibm.mq.jms.MQXASession
WebSphere MQ JMS exposes its JTS support in the XAConnectionFactory, XAConnection, and XASession classes. These classes are provided for use in a J2EE application server environment.
WebSphere Application Server Version 5 uses these classes to create and manage a pool of XAConnection and XASession objects. A JMS application does not need to use these classes directly if it is running in this environment.
A JMS application might need to use the XASession class if it is running in a WebSphere Application Server environment with a version of WebSphere Application Server before Version 5.
Field Summary |
Fields inherited from interface javax.jms.Session |
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED |
Method Summary | |
void |
close()
Closes the session. |
void |
commit()
Not to be called in this context. |
javax.jms.MessageConsumer |
createConsumer(javax.jms.Destination destination)
Call the underlying JMS session to create a Message Consumer |
javax.jms.MessageConsumer |
createConsumer(javax.jms.Destination destination,
java.lang.String messageSelector)
Call the underlying JMS session to create a Message Consumer |
javax.jms.MessageConsumer |
createConsumer(javax.jms.Destination destination,
java.lang.String messageSelector,
boolean noLocal)
Call the underlying JMS session to create a Message Consumer |
javax.jms.MessageProducer |
createProducer(javax.jms.Destination destination)
Call the underlying JMS session to create a Message Producer A client uses a MessageProducer object to send messages to a destination. |
javax.jms.Session |
getSession()
Gets the session associated with this XASession. |
boolean |
getTransacted()
Indicates that XA sessions are always transacted. |
javax.transaction.xa.XAResource |
getXAResource()
Gets the XA resource. |
void |
recover()
Not to be called in this context. |
void |
rollback()
Not to be called in this context. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.jms.Session |
createBrowser, createBrowser, createBytesMessage, createDurableSubscriber, createDurableSubscriber, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createQueue, createStreamMessage, createTemporaryQueue, createTemporaryTopic, createTextMessage, createTextMessage, createTopic, getAcknowledgeMode, getMessageListener, run, setMessageListener, unsubscribe |
Method Detail |
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 MQSession
JMSException,
- for reasons of inheritance.
javax.jms.JMSException
- with one of the following reasons:
public final void close() throws javax.jms.JMSException
close
in interface javax.jms.Session
close
in class MQSession
javax.jms.JMSException
- if the Session could not be closed due to an internal error.public void commit() throws javax.jms.JMSException
commit
in interface javax.jms.XASession
commit
in class MQSession
javax.jms.TransactionInProgressException
- always.
javax.jms.JMSException
- with one of the following reasons:
public void rollback() throws javax.jms.JMSException
rollback
in interface javax.jms.XASession
rollback
in class MQSession
javax.jms.TransactionInProgressException
- always.
javax.jms.JMSException
- with one of the following reasons:
public void recover() throws javax.jms.JMSException
recover
in interface javax.jms.Session
recover
in class MQSession
javax.jms.IllegalStateException
- always.
javax.jms.JMSException
- with one of the following reasons:
public javax.jms.Session getSession() throws javax.jms.JMSException
getSession
in interface javax.jms.XASession
javax.jms.JMSException
- neverpublic javax.jms.MessageConsumer createConsumer(javax.jms.Destination destination) throws javax.jms.JMSException
createConsumer
in interface javax.jms.Session
createConsumer
in class MQSession
destination
- the Destination to access.
javax.jms.JMSException
- if the command fails due to some internal JMS error.public javax.jms.MessageConsumer createConsumer(javax.jms.Destination destination, java.lang.String messageSelector) throws javax.jms.JMSException
createConsumer
in interface javax.jms.Session
createConsumer
in class MQSession
destination
- the Destination to access.messageSelector
- the message selector
javax.jms.JMSException
- if the command fails due to some internal JMS error.public javax.jms.MessageConsumer createConsumer(javax.jms.Destination destination, java.lang.String messageSelector, boolean noLocal) throws javax.jms.JMSException
createConsumer
in interface javax.jms.Session
createConsumer
in class MQSession
destination
- the Destination to access.messageSelector
- the message selectornoLocal
- when the destination is a topic, true inhibits the delivery of messages
published by its own connection. The behavior for NoLocal is ignored if the
destination is a queue.
javax.jms.JMSException
- with linked exception to whatever createQConsumer, createTConsumer and
addConsumer throw.public javax.jms.MessageProducer createProducer(javax.jms.Destination destination) throws javax.jms.JMSException
A client uses a MessageProducer object to send messages to a destination. Since Queue and Topic both inherit from Destination, they can be used in the destination parameter to create a MessageProducer object.
createProducer
in interface javax.jms.Session
createProducer
in class MQSession
destination
- - the Destination to send to, or null if this is a producer which does not have a specified destination.
javax.jms.JMSException
- - if the session fails to create a MessageProducer due to some internal error.
|
(c) Copyright IBM Corp. 2005. All Rights Reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |