jms Session.SESSION_TRANSACTED和Transactional

时间:2013-10-02 07:42:24

标签: java java-ee jms

创建会话createQueueSessioncreateTopicSession中的布尔标志有什么区别,它指示会话是否被处理,Session.SESSION_TRANSACTED看起来像确认模式,但是java文档点它不是:

SESSION_TRANSACTED

public static final int SESSION_TRANSACTED
This value is returned from the method getAcknowledgeMode if the session is transacted. If a Session is transacted, the acknowledgement mode is ignored.

当我打电话时(例如)

createQueueSession(false, Session.SESSION_TRANSACTED);

抛出javax.jms.JMSException: Incorrect acknowledge mode specified.那么有区别吗?

0 个答案:

没有答案