Jboss7:尝试解析JNDI名称“ java:/ XAConnectionFactory”时出错:javax.naming.NameNotFoundException:XAConnectionFactory

问题描述 投票:0回答:1

我正在将ATG应用程序从10.x升级到11.x。我还将jboss-eap从5.1升级到7.2,我遇到了各种JBoss问题,其中许多问题已修复。

截至目前,启动ATG履行服务器时出现以下错误,这似乎是JBoss JMS问题。

07:56:43,346 ERROR [nucleusNamespace.atg.dynamo.messaging.MessagingManager] (ServerService Thread Pool -- 81) PatchBay failed to startup properly : a Scheduler job will be registered to continue trying to bring PatchBay up : note this may result in further errors: atg.nucleus.ServiceException: An error occurred trying to resolve JNDI name "java:/XAConnectionFactory" for the "xa-topic-connection-factory-name" in provider "Hornet" in definition file "/atg/dynamo/messaging/dynamoMessagingSystem.xml": javax.naming.NameNotFoundException: XAConnectionFactory -- service jboss.naming.context.java.XAConnectionFactory
    at atg.dms.patchbay.Provider.initializeTopicConnection(Provider.java:364)
    at atg.dms.patchbay.PatchBayManager.createInputDestination(PatchBayManager.java:1811)
    at atg.dms.patchbay.PatchBayManager.createInputPorts(PatchBayManager.java:1446)
    at atg.dms.patchbay.PatchBayManager.createElementManager(PatchBayManager.java:1477)
    at atg.dms.patchbay.PatchBayManager.createMessageFilters(PatchBayManager.java:1338)

在Jboss 5中,有以下配置文件:

ls jboss-eap-5.1/seam/bootstrap/deploy/messaging/
connection-factories-service.xml  hsqldb-persistence-service.xml  legacy-service.xml     remoting-service.xml
destinations-service.xml          jms-ds.xml                      messaging-service.xml

在Jboss 7.2中,在standalone.xml文件中具有以下消息配置:

        <subsystem xmlns="urn:jboss:domain:messaging-activemq:4.0">
            <server name="default">
                <journal pool-files="10"/>
                <security-setting name="#">
                    <role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/>
                </security-setting>
                <address-setting name="#" dead-letter-address="jms.queue.DLQ" expiry-address="jms.queue.ExpiryQueue" max-size-bytes="10485760" page-size-bytes="2097152" message-counter-history-day-limit="10"/>
                <http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor"/>
                <http-connector name="http-connector-throughput" socket-binding="http" endpoint="http-acceptor-throughput">
                    <param name="batch-delay" value="50"/>
                </http-connector>
                <in-vm-connector name="in-vm" server-id="0">
                    <param name="buffer-pooling" value="false"/>
                </in-vm-connector>
                <http-acceptor name="http-acceptor" http-listener="default"/>
                <http-acceptor name="http-acceptor-throughput" http-listener="default">
                    <param name="batch-delay" value="50"/>
                    <param name="direct-deliver" value="false"/>
                </http-acceptor>
                <in-vm-acceptor name="in-vm" server-id="0">
                    <param name="buffer-pooling" value="false"/>
                </in-vm-acceptor>
                <jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/>
                <jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>
                <connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/>
                <connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector"/>
                <pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/>
            </server>
        </subsystem>        

下面是代码中atg / dynamo / messaging / dynamoMessagingSystem.xml的内容

<?xml version="1.0" encoding="UTF-8"?>

<dynamo-message-system>
  <patchbay>
    <!-- JBoss Hornet provider -->
    <provider>
      <provider-name>Hornet</provider-name>
      <xa-topic-connection-factory-name>
        java:/XAConnectionFactory
      </xa-topic-connection-factory-name>
      <xa-queue-connection-factory-name>
        java:/XAConnectionFactory
      </xa-queue-connection-factory-name>
      <supports-transactions>
        true
      </supports-transactions>
      <supports-xa-transactions>
        true
      </supports-xa-transactions>
      <username>***</username>
      <password>***</password>
      <initial-context-factory>
        /abcd/common/services/HornetQ
      </initial-context-factory>
    </provider>
    <!-- Reporting order message source -->
    <message-source>
      <nucleus-name>/abcd/commerce/fulfillment/processor/SendReportingSubmitOrderMessage</nucleus-name>
      <output-port>
        <port-name>ReportingOrderSubmit</port-name>
        <output-destination>
          <provider-name>local</provider-name>
          <destination-name>localdms:/local/Fulfillment/LocalSubmitOrder</destination-name>
          <destination-type>Topic</destination-type>
        </output-destination>
      </output-port>
    </message-source>
    <!-- Split order message source -->
    <message-source>
      <nucleus-name>/abcd/commerce/fulfillment/processor/SendSplitMessages/</nucleus-name>
      <output-port>
        <port-name>DEFAULT</port-name>
      </output-port>
      <output-port>
        <port-name>FulfillmentOrderSubmitPort</port-name>
        <output-destination>
          <destination-name>patchbay:/Fulfillment/SubmitOrder</destination-name>
          <destination-type>Topic</destination-type>
        </output-destination>
      </output-port>
    </message-source>
    <!-- Custom source/sink will take fulfillment failures and forward them, perhaps to multiple queues or none -->
    <message-source>
      <nucleus-name>
        /abcd/commerce/fulfillment/FailureMessageSink
      </nucleus-name>
      <output-port>
        <port-name>
          FulfillmentFailureNotifications
        </port-name>
        <output-destination>
          <destination-name>
            patchbay:/Fulfillment/FulfillmentFailureNotifications
          </destination-name>
          <destination-type>
            Topic
          </destination-type>
        </output-destination>
      </output-port>
    </message-source>

    <!-- Custom source/sink will take fulfillment failures and forward them, perhaps to multiple queues or none -->
    <message-sink>
      <nucleus-name>
        /abcd/commerce/fulfillment/FailureMessageSink
      </nucleus-name>
      <input-port>
        <port-name>FulfillmentError</port-name>
        <input-destination>
          <destination-name>patchbay:/Fulfillment/ErrorNotification</destination-name>
          <destination-type>Queue</destination-type>
        </input-destination>
      </input-port>
    </message-sink>

我是jboss和ATG的新手,有人可以帮助我解决问题吗?

jboss jms jboss7.x atg-dynamo
1个回答
0
投票

java:/ XAConnectionFactory在WildFly中未定义。您需要配置WildFly以正确创建和公开这些连接工厂,如下所示:

另请注意,您现在使用的是Apache ActiveMQ Artemis,不再使用HornetQ

© www.soinside.com 2019 - 2024. All rights reserved.