1

我正在使用 JMS Polling 使用以下代码每 5 分钟轮询一次 JMS 队列。在下面的代码中,我将轮询频率设置为 1 分钟以进行测试。轮询工作正常,但它在日志中抛出异常。我无法弄清楚它为什么会这样。试图通过更改一些设置来玩,但无法弄清楚。

请帮我解决这个问题。

<jms:connector name="jmsConnector" jndiInitialFactory="${jndi.initialFactoryClass}" connectionFactoryJndiName="${jndi.connectionFactoryName}"
        jndiProviderUrl="${jms.brokerURL}" username="${jms.username}" password="${jms.password}" persistentDelivery="true" maxRedelivery="2" 
        numberOfConcurrentTransactedReceivers="5" disableTemporaryReplyToDestinations="true" specification="1.1" />

<service-overrides transactedMessageReceiver="com.mulesoft.mule.transport.jms.TransactedPollingJmsMessageReceiver"/>

<jms:inbound-endpoint queue="${JMS_QUEUE}" exchange-pattern="one-way">
    <jms:transaction action="ALWAYS_BEGIN"/>
    <properties>
         <spring:entry key="pollingFrequency" value="60000" />
    </properties>
</jms:inbound-endpoint>

轮询工作正常,但在日志中引发以下异常:

WARN  2013-05-02 10:33:05,072 [jmsConnector.receiver.03] com.mulesoft.mule.transport.jms.TransactedPollingJmsMessageReceiver: Error in TX notification handler.
javax.jms.IllegalStateException: The session is closed.
    at progress.message.jimpl.Session.getJMSObjectClosedException(Session.java:3341)
    at progress.message.jimpl.Session.rollback(Session.java:1499)
    at com.mulesoft.mule.transport.jms.TransactedPollingJmsMessageReceiver$2.onNotification(TransactedPollingJmsMessageReceiver.java:323)
    at com.mulesoft.mule.transport.jms.TransactedPollingJmsMessageReceiver$2.onNotification(TransactedPollingJmsMessageReceiver.java:298)
    at org.mule.context.notification.Sender.dispatch(Sender.java:40)
    at org.mule.context.notification.Policy.dispatch(Policy.java:122)
    at org.mule.context.notification.ServerNotificationManager.notifyListeners(ServerNotificationManager.java:249)
    at org.mule.context.notification.ServerNotificationManager.fireNotification(ServerNotificationManager.java:200)
    at org.mule.DefaultMuleContext.fireNotification(DefaultMuleContext.java:435)
    at org.mule.transaction.AbstractTransaction.fireNotification(AbstractTransaction.java:144)
    at org.mule.transaction.AbstractTransaction.rollback(AbstractTransaction.java:98)
    at org.mule.transaction.AbstractSingleResourceTransaction.rollback(AbstractSingleResourceTransaction.java:85)
    at org.mule.transaction.TransactionCoordination.resolveTransaction(TransactionCoordination.java:214)
    at org.mule.execution.BeginAndResolveTransactionInterceptor.resolveTransactionIfRequired(BeginAndResolveTransactionInterceptor.java:77)
    at org.mule.execution.BeginAndResolveTransactionInterceptor.execute(BeginAndResolveTransactionInterceptor.java:59)
    at org.mule.execution.ResolvePreviousTransactionInterceptor.execute(ResolvePreviousTransactionInterceptor.java:48)
    at org.mule.execution.SuspendXaTransactionInterceptor.execute(SuspendXaTransactionInterceptor.java:54)
    at org.mule.execution.ValidateTransactionalStateInterceptor.execute(ValidateTransactionalStateInterceptor.java:44)
    at org.mule.execution.IsolateCurrentTransactionInterceptor.execute(IsolateCurrentTransactionInterceptor.java:44)
    at org.mule.execution.ExternalTransactionInterceptor.execute(ExternalTransactionInterceptor.java:52)
    at org.mule.execution.RethrowExceptionInterceptor.execute(RethrowExceptionInterceptor.java:32)
    at org.mule.execution.RethrowExceptionInterceptor.execute(RethrowExceptionInterceptor.java:17)
    at org.mule.execution.TransactionalErrorHandlingExecutionTemplate.execute(TransactionalErrorHandlingExecutionTemplate.java:113)
    at org.mule.execution.TransactionalErrorHandlingExecutionTemplate.execute(TransactionalErrorHandlingExecutionTemplate.java:34)
    at com.mulesoft.mule.transport.jms.TransactedPollingJmsMessageReceiver.poll(TransactedPollingJmsMessageReceiver.java:110)
    at org.mule.transport.AbstractPollingMessageReceiver.performPoll(AbstractPollingMessageReceiver.java:219)
    at org.mule.transport.PollingReceiverWorker.poll(PollingReceiverWorker.java:84)
    at org.mule.transport.PollingReceiverWorker.run(PollingReceiverWorker.java:53)
    at org.mule.work.WorkerContext.run(WorkerContext.java:311)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

请帮助我调查这个问题。

维杰

4

1 回答 1

1

这是警告而不是错误:虽然有点吓人,但就 Mule 而言,这不是错误。也许 Progress JMS 客户端有点挑剔,并且与其他 JMS 客户端的行为方式不同,但是 Mule 没有报告错误,因此它不会影响您的应用程序。

无论如何,我建议您打开一个 JIRA,以便 MuleSoft 可以调查该问题并可能添加对这个特定 JMS 客户端的支持。

于 2013-05-02T22:25:49.993 回答