首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在JMS端点上永远重新连接不适用于xa事务

在JMS端点上永远重新连接不适用于xa事务
EN

Stack Overflow用户
提问于 2012-05-18 22:08:33
回答 1查看 973关注 0票数 1

我使用的是Mule3.2.1单机版和JBoss 5.1。下面是我的流程:

代码语言:javascript
复制
<?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。事实上,它甚至没有尝试过!如果我从我的流中删除事务(如下所示),一切都是正常的。

代码语言:javascript
复制
<?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>

以下是这两个场景的日志片段:With transactionsWithout transactions。在等待重新连接两分钟后,我停止了mule。

我的问题是:要让reconnect-forever正确处理事务,我应该做些什么?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-05-21 19:21:29

我在Jboss和ActiveMQ上也遇到了同样的问题。该问题似乎已在问题http://www.mulesoft.org/jira/browse/MULE-6028中解决。我检查了一下,似乎reconnect在3.3.0-RC3版本中工作得很好。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10654175

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档