我尝试为我的项目设置它,如果我在 Tomcat 完成之前杀死它,它似乎可以将请求放回队列中。但是,如果我让它运行,我会得到一个例外。
我唯一更改的是将下面的 JMS 事务行添加到其他工作正常的服务中。Mule 2 中是否存在错误,或者我需要做些什么?
<service name="ChangeService">
<inbound>
<jms:inbound-endpoint
connector-ref="jmsConnectorWMQ"
address="${change.service.inbound.endpoint}?method=applyListToRecords"
transformer-refs="Jms2Obj TraceRouteInbound"
responseTransformer-refs="DiagnosticsXForm TraceRouteOutbound MessagePropertiesTransformer Obj2Jms">
<jms:transaction action="ALWAYS_BEGIN"/>
</jms:inbound-endpoint>
</inbound>
<component>
<interceptor-stack ref="InterceptorStack"/>
<spring-object bean="service"/>
</component>
</service>
例外:
ERROR [asyncDelivery4][2012-10-18 13:52:21,123] - org.oclc.mule.interceptors.FaultHandlingInterceptor Invocation failed:
org.mule.api.service.ServiceException: Component that caused exception is: SedaService{ChangeServiceAnyXml}. Message payload is of type: JMSTextMessage
at org.mule.component.DefaultLifecycleAdapter.invoke(DefaultLifecycleAdapter.java:216)
at org.mule.component.AbstractJavaComponent.invokeComponentInstance(AbstractJavaComponent.java:83)
at org.mule.component.AbstractJavaComponent.doInvoke(AbstractJavaComponent.java:74)
at org.mule.component.AbstractComponent.invokeInternal(AbstractComponent.java:133)
at org.mule.component.AbstractComponent.intercept(AbstractComponent.java:93)
at org.mule.component.ComponentInterceptorInvoker.invoke(ComponentInterceptorInvoker.java:52)
at org.mule.interceptor.InterceptorStack$Invoc.invoke(InterceptorStack.java:70)
at org.mule.api.interceptor.Invocation$invoke.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
at org.oclc.mule.interceptors.FaultHandlingInterceptor.intercept(FaultHandlingInterceptor.groovy:39)
at org.mule.interceptor.InterceptorStack$Invoc.invoke(InterceptorStack.java:65)
at org.mule.api.interceptor.Invocation$invoke.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
at org.oclc.mule.interceptors.StatsLoggingInterceptor.intercept(StatsLoggingInterceptor.groovy:37)
at org.mule.interceptor.InterceptorStack$Invoc.invoke(InterceptorStack.java:65)
at org.mule.interceptor.InterceptorStack.intercept(InterceptorStack.java:46)
at org.mule.component.ComponentInterceptorInvoker.invoke(ComponentInterceptorInvoker.java:48)
at org.mule.component.AbstractComponent.invoke(AbstractComponent.java:165)
at org.mule.service.AbstractService.invokeComponent(AbstractService.java:921)
at org.mule.model.seda.SedaService.doSend(SedaService.java:256)
at org.mule.service.AbstractService.sendEvent(AbstractService.java:499)
at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:359)
at org.mule.routing.inbound.DefaultInboundRouterCollection.send(DefaultInboundRouterCollection.java:228)
at org.mule.routing.inbound.DefaultInboundRouterCollection.route(DefaultInboundRouterCollection.java:188)
at org.mule.transport.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:382)
at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:258)
at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:203)
at org.mule.transport.AbstractReceiverWorker$1.doInTransaction(AbstractReceiverWorker.java:147)
at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:117)
at org.mule.transport.AbstractReceiverWorker.doRun(AbstractReceiverWorker.java:165)
at org.mule.transport.AbstractReceiverWorker.run(AbstractReceiverWorker.java:67)
at org.mule.work.WorkerContext.run(WorkerContext.java:310)
at org.mule.work.SyncWorkExecutor.doExecute(SyncWorkExecutor.java:41)
at org.mule.work.MuleWorkManager.executeWork(MuleWorkManager.java:287)
at org.mule.work.MuleWorkManager.doWork(MuleWorkManager.java:180)
at org.mule.transport.jms.MultiConsumerJmsMessageReceiver$SubReceiver.onMessage(MultiConsumerJmsMessageReceiver.java:316)
at com.ibm.mq.jms.MQMessageConsumer.receiveAsync(MQMessageConsumer.java:2969)
at com.ibm.mq.jms.SessionAsyncHelper.run(SessionAsyncHelper.java:406)
at java.lang.Thread.run(Thread.java:619)