【问题标题】:Wildfly 11 : Adding multiple last resources is disallowed. Trying to add LastResourceRecordWildfly 11:不允许添加多个最后一个资源。尝试添加 LastResourceRecord
【发布时间】:2021-10-08 00:19:17
【问题描述】:

在 GUI 中打开任何消息时,我在云环境中面临以下问题。 但在我的本地环境中同样适用。

数据库:Azure SQL 服务器 应用服务器:Wildfly 11

错误: "STATUS_MARKED_ROLLBACK - 无法准备语句"

[com.arjuna.ats.arjuna] (default task-16) ARJUNA012140: **Adding multiple last resources is disallowed. Trying to add LastResourceRecord**(XAOnePhaseResource(LocalXAResourceImpl@4ef4285a[connectionListener=5737baa
6 connectionManager=71d95908 warned=false currentXid=< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff0af40057:-6bf97584:610804c2:652, node_name=1, branch_uid=0:ffff0af40057:-6bf97584:610804c2:669, subordinatenodename=nu
ll, eis_name=java:/jdbc/xxx/xxx/xxx/datasourceUncommitted > productName=Microsoft SQL Server productVersion=12.00.2195 jndiName=java:/jdbc/xxx/xxx/xxx/datasourceUncommitted])), but already have LastResourceRecord(XAOnePhaseResour
ce(LocalXAResourceImpl@9b90875[connectionListener=669bdd38 connectionManager=7991953a warned=false currentXid=< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff0af40057:-6bf97584:610804c2:652, node_name=1, branch_uid=0:ff
ff0af40057:-6bf97584:610804c2:666, subordinatenodename=null, eis_name=java:/jdbc/xxx/xxx/xxx/datasource > productName=Microsoft SQL Server productVersion=12.00.2195 jndiName=java:/jdbc/xxx/xxx/xxx/datasource]))

请帮我解决这个问题。

【问题讨论】:

    标签: hibernate datasource azure-sql-server jboss-wildfly-11


    【解决方案1】:

    您需要将allowMultipleLastResources属性设置为true,如下所示:

    <bean name="CoreEnvironmentBean" class="com.arjuna.ats.arjuna.common.CoreEnvironmentBean">
    ...
       <property name="allowMultipleLastResources">true</property>
    ...
    </bean>
    

    试试下面的代码:

    <system-properties>
    <property name = "com.arjuna.ats.arjuna.allowMultipleLastResources" value = "true" />
    </system-properties>
    

    参考链接 - https://developer.jboss.org/thread/160950

    【讨论】:

    • 谢谢。你知道如何使用jboss-cli 脚本来设置吗?
    猜你喜欢
    • 1970-01-01
    • 2021-12-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多