创建会话createQueueSession
和createTopicSession
中的布尔标志有什么区别,它指示会话是否被处理,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.
那么有区别吗?