2014-09-26 102 views
1

我想從內部交換模式請求響應的vm入站端點使用異步作用域。這個想法是從vmmainflow異步調用另外兩個流。從我從mule文檔中瞭解的情況來看,當vm與請求 - 響應交換模式一起使用時,exceution會在調用vm的同一個線程上進行。我現在需要從這個虛擬機流中調用另外兩個流,它們是單向的,可以異步調用。但是,當我從我的mule-config執行以下操作時,出現如下所示的錯誤。這僅在對服務發出併發請求時發生。我不確定從vm調用異步的方法。如果這種方法是錯誤的,請告訴我如何去做這件事。我正在考慮使用另一個帶入站的流作爲vm(單向),它實際調用了兩個流,然後從我的vmmainflow調用該新的vm。騾異步拋出handleWorkException

<flow name="vmmainflow"> 
    <vm:inbound-endpoint address="vm://vmmainflow" 
      exchange-pattern="request-response" /> 
    ........ 
    <async> 
     <flow-ref name="flow1" /> 
     <flow-ref name="flow2" /> 
    </async> 
    ..... 
    </flow> 

以下是我的錯誤:

 Exception in thread "null.processor.async.2" org.mule.api.MuleRuntimeException: An exception occurred while invoking message processor "DefaultMessageProcessorChain '(inner iterating chain) of 'async' child chain' 
[ 
    [email protected], 
    [email protected], 
    [email protected] 
]" for asynchronously. 
org.mule.processor.AsyncInterceptingMessageProcessor handleWorkException] - Work caused exception on 'workCompleted'. Work being executed was: org.mule.processo[email protected]483ebe 
    at org.mule.processor.AsyncInterceptingMessageProcessor.handleWorkException(AsyncInterceptingMessageProcessor.java:197) 
    at org.mule.processor.AsyncInterceptingMessageProcessor.workCompleted(AsyncInterceptingMessageProcessor.java:173) 
    at org.mule.work.WorkerContext.run(WorkerContext.java:368) 
    at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061) 
    at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575) 
    at java.lang.Thread.run(Thread.java:662) 
Caused by: java.util.ConcurrentModificationException 
    at org.apache.commons.collections.map.AbstractHashedMap$HashIterator.nextEntry(AbstractHashedMap.java:1113) 
    at org.apache.commons.collections.map.AbstractHashedMap$KeySetIterator.next(AbstractHashedMap.java:938) 
    at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1010) 
    at org.mule.DefaultMuleMessage.copyMessageProperties(DefaultMuleMessage.java:228) 
    at org.mule.DefaultMuleMessage.<init>(DefaultMuleMessage.java:203) 
    at org.mule.DefaultMuleMessage.<init>(DefaultMuleMessage.java:279) 
    at org.mule.DefaultMuleMessage.newThreadCopy(DefaultMuleMessage.java:1375) 
    at org.mule.DefaultMuleEvent.newThreadCopy(DefaultMuleEvent.java:713) 
    at org.mule.RequestContext.newEvent(RequestContext.java:135) 
    at org.mule.RequestContext.setEvent(RequestContext.java:72) 
    at org.mule.construct.SimpleFlowConstruct.process(SimpleFlowConstruct.java:125) 
    at org.mule.config.spring.factories.FlowRefFactoryBean$1.process(FlowRefFactoryBean.java:40) 
    at org.mule.processor.chain.DefaultMessageProcessorChain.doProcess(DefaultMessageProcessorChain.java:72) 
    at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:89) 
    at org.mule.processor.AbstractInterceptingMessageProcessor.processNext(AbstractInterceptingMessageProcessor.java:81) 
    at org.mule.interceptor.AbstractEnvelopeInterceptor.process(AbstractEnvelopeInterceptor.java:55) 
    at org.mule.processor.AsyncInterceptingMessageProcessor.processNextTimed(AsyncInterceptingMessageProcessor.java:122) 
    at org.mule.processor.AsyncInterceptingMessageProcessor$AsyncMessageProcessorWorker.doRun(AsyncInterceptingMessageProcessor.java:212) 
    at org.mule.work.AbstractMuleEventWork.run(AbstractMuleEventWork.java:41) 
    at org.mule.work.WorkerContext.run(WorkerContext.java:309) 
+0

能否請你解釋你在這裏的問題??你需要提供你的騾子配置,以便你的問題可以被檢測到.. – 2014-09-27 06:55:22

+0

請用你的完整騾流更新你的問題..請不要寫你的騾子在評論部分流動..這是非常難以閱讀..請更新與你的流量問題 – 2014-09-29 10:08:34

+0

請看看更新的問題 – rst 2014-09-29 12:52:32

回答

1

這似乎是一個真正的錯誤給我。我無法想到可能會做錯的事情,這會導致異步消息範圍在複製消息屬性時拋出ConcurrentModificationException。

也許你的下一步應該是在MuleSoft JIRA中創建一個問題。如果您是MuleSoft企業客戶,我鼓勵您在您的支持門戶中創建一個案例,這可以幫助您將問題轉移到線路的前端。我建議鏈接到這兩個StackOverflow問題。