1

Mule 3.2.1 スタンドアロンと JBoss 5.1 を使用しています。これが私のフローです:

<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"       xmlns:jms="http://www.mulesoft.org/schema/mule/jms" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:core="http://www.mulesoft.org/schema/mule/core" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jbossts="http://www.mulesoft.org/schema/mule/jbossts" xmlns:management="http://www.mulesoft.org/schema/mule/management" version="CE-3.2.1" xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/jms     http://www.mulesoft.org/schema/mule/jms/current/mule-jms.xsd 
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd 
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd 
http://www.mulesoft.org/schema/mule/jbossts http://www.mulesoft.org/schema/mule/jbossts/current/mule-jbossts.xsd 
http://www.mulesoft.org/schema/mule/management http://www.mulesoft.org/schema/mule/management/current/mule-management.xsd ">
<jbossts:transaction-manager/> 
<jms:connector name="JMS" specification="1.1"  numberOfConsumers="1" jndiInitialFactory="org.jnp.interfaces.NamingContextFactory" jndiProviderUrl="jnp://localhost:1099" connectionFactoryJndiName="java:/XAConnectionFactory" maxRedelivery="10" doc:name="JMS">
        <reconnect-forever frequency="5000"/>
</jms:connector>
<flow name="flow" doc:name="flow">
    <jms:inbound-endpoint queue="test1" connector-ref="JMS" doc:name="qt1">
        <xa-transaction action="BEGIN_OR_JOIN" />
    </jms:inbound-endpoint>
    <jms:outbound-endpoint queue="test2" connector-ref="JMS" doc:name="qt2">
        <xa-transaction action="ALWAYS_JOIN"/>
    </jms:outbound-endpoint>
</flow>

Mule で実行して jboss をオフにしてから再度オンにすると、アプリが jms に再接続しません。実際、それは試しさえしません!フローからトランザクションを削除すると (以下のように)、すべて問題ありません。

<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"  xmlns:jms="http://www.mulesoft.org/schema/mule/jms"  xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:core="http://www.mulesoft.org/schema/mule/core" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jbossts="http://www.mulesoft.org/schema/mule/jbossts" xmlns:management="http://www.mulesoft.org/schema/mule/management" version="CE-3.2.1"  xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/jms http://www.mulesoft.org/schema/mule/jms/current/mule-jms.xsd 
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd 
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd 
http://www.mulesoft.org/schema/mule/jbossts http://www.mulesoft.org/schema/mule/jbossts/current/mule-jbossts.xsd 
http://www.mulesoft.org/schema/mule/management http://www.mulesoft.org/schema/mule/management/current/mule-management.xsd ">
<jms:connector name="JMS" specification="1.1"  numberOfConsumers="1" jndiInitialFactory="org.jnp.interfaces.NamingContextFactory" jndiProviderUrl="jnp://localhost:1099" connectionFactoryJndiName="java:/XAConnectionFactory" maxRedelivery="10" doc:name="JMS">
        <reconnect-forever frequency="5000"/>
</jms:connector>
<flow name="flow" doc:name="flow">
    <jms:inbound-endpoint queue="test1" connector-ref="JMS" doc:name="qt1">
    </jms:inbound-endpoint>
    <jms:outbound-endpoint queue="test2" connector-ref="JMS" doc:name="qt2">
    </jms:outbound-endpoint>
</flow>

これら 2 つのシナリオのログ フラグメントを次に示します 。トランザクションあり と トランザクションなし。再接続を 2 分間待った後、ミュールを停止しました。

reconnect-forever私の質問は、トランザクションを適切に処理するにはどうすればよいですか?

4

1 に答える 1

1

Jboss と ActiveMQ の両方で同じ問題が発生しました。issue http://www.mulesoft.org/jira/browse/MULE-6028で問題が解決されたようです。確認したところ、バージョン 3.3.0-RC3 で再接続がうまくいくようです。

于 2012-05-21T11:21:29.203 に答える