2

createQueueSessioncreate session 中的布尔标志与createTopicSession指示会话是否已进行事务处理以及看起来像确认模式之间有什么区别Session.SESSION_TRANSACTED,但 java docs 指出它不是:

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.那么有区别吗?

4

0 回答 0