20.2. 配置客户端
					预确认模式可以在客户端的 JNDI 上下文环境中配置,例如在 jndi.properties 文件中:
				
java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory connection.ConnectionFactory=tcp://localhost:8080?preAcknowledge=true
java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
connection.ConnectionFactory=tcp://localhost:8080?preAcknowledge=true
					另外,也可通过 JMS API 使用预确认模式,创建一个带有 ActiveMQSession.PRE_ACKNOWLEDGE 常量的 JMS 会话。
				
// messages will be acknowledge on the server *before* being delivered to the client Session session = connection.createSession(false, ActiveMQJMSConstants.PRE_ACKNOWLEDGE);
// messages will be acknowledge on the server *before* being delivered to the client
Session session = connection.createSession(false, ActiveMQJMSConstants.PRE_ACKNOWLEDGE);