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
					另外,若要使用使用 Jakarta 消息传递 API 的预确认模式,请创建一个具有 ActiveMQSession.PRE_ACKNOWLEDGE 常量的 Jakarta 消息会话。
				
// 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);