2

JBoss AS EAP6 を試しています。

ただし、JBoss AS 7.1.1 を使用して実装されたシステム ソリューションがあります。外部の HornetQ 2.1.14 実装。これは JBoss 7.1.1 では正常に機能しますが、EAP 6 は HornetQ に接続しません。

私はlocalhostとして実行しています。これが機能しない場合ですか、それとも何かが欠けていて構成が間違っていますか?

HornetQ の設定:

hornetq-beans.xml

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

<deployment xmlns="urn:jboss:bean-deployer:2.0">

   <bean name="Naming" class="org.jnp.server.NamingBeanImpl"/>

   <!-- JNDI server. Disable this if you don't want JNDI -->
   <bean name="JNDIServer" class="org.jnp.server.Main">
      <property name="namingInfo">
     <inject bean="Naming"/>
      </property>
      <property name="port">${jnp.port:1099}</property>
      <property name="bindAddress">${jnp.host:localhost}</property>
      <property name="rmiPort">${jnp.rmiPort:1098}</property>
      <property name="rmiBindAddress">${jnp.host:localhost}</property>
   </bean>

   <!-- MBean server -->
   <bean name="MBeanServer" class="javax.management.MBeanServer">
      <constructor factoryClass="java.lang.management.ManagementFactory"
           factoryMethod="getPlatformMBeanServer"/>
   </bean> 

   <!-- The core configuration -->
   <bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration">
   </bean>

    <!-- The security manager -->
   <bean name="HornetQSecurityManager" class="org.hornetq.spi.core.security.HornetQSecurityManagerImpl">
      <start ignored="true"/>
      <stop ignored="true"/>
   </bean>

    <!-- The core server -->
   <bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl">
      <constructor>
     <parameter>
        <inject bean="Configuration"/>
     </parameter>
     <parameter>
        <inject bean="MBeanServer"/>
     </parameter>
     <parameter>
        <inject bean="HornetQSecurityManager"/>
     </parameter>        
      </constructor>
      <start ignored="true"/>
      <stop ignored="true"/>
   </bean>

   <!-- The JMS server -->
   <bean name="JMSServerManager" class="org.hornetq.jms.server.impl.JMSServerManagerImpl">
      <constructor>         
     <parameter>
        <inject bean="HornetQServer"/>
     </parameter>         
      </constructor>
   </bean>


</deployment>

hornetq-configuration.xml

<configuration xmlns="urn:hornetq"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">

   <clustered>true</clustered>

   <paging-directory>${data.dir:../data}/node-a/paging</paging-directory>

   <bindings-directory>${data.dir:../data}/node-a/bindings</bindings-directory>

   <journal-directory>${data.dir:../data}/node-a/journal</journal-directory>

   <journal-min-files>10</journal-min-files>

   <large-messages-directory>${data.dir:../data}/node-a/large-messages</large-messages-directory>

   <connectors>      
      <connector name="netty">
     <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
     <param key="host"  value="${hornetq.remoting.netty.host:localhost}"/>
     <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>
      </connector>

      <connector name="netty-throughput">
     <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
     <param key="host"  value="${hornetq.remoting.netty.host:localhost}"/>
     <param key="port"  value="${hornetq.remoting.netty.batch.port:5455}"/>
     <param key="batch-delay" value="50"/>
      </connector>
   </connectors>

   <acceptors>
      <acceptor name="netty">
     <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
     <param key="host"  value="${hornetq.remoting.netty.host:localhost}"/>
     <param key="port"  value="${hornetq.remoting.netty.port:5445}"/>
      </acceptor>

      <acceptor name="netty-throughput">
     <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
     <param key="host"  value="${hornetq.remoting.netty.host:localhost}"/>
     <param key="port"  value="${hornetq.remoting.netty.batch.port:5455}"/>
     <param key="batch-delay" value="50"/>
     <param key="direct-deliver" value="false"/>
      </acceptor>
   </acceptors>

   <broadcast-groups>
      <broadcast-group name="bg-group1">
     <group-address>231.7.7.7</group-address>
     <group-port>9876</group-port>
     <broadcast-period>5000</broadcast-period>
     <connector-ref>netty</connector-ref>
      </broadcast-group>
   </broadcast-groups>

   <discovery-groups>
      <discovery-group name="dg-group1">
     <group-address>231.7.7.7</group-address>
     <group-port>9876</group-port>
     <refresh-timeout>10000</refresh-timeout>
      </discovery-group>
   </discovery-groups>

   <cluster-connections>
      <cluster-connection name="my-cluster">
     <address>jms</address>  
     <connector-ref>netty</connector-ref>
         <retry-interval>500</retry-interval>
         <forward-when-no-consumers>true</forward-when-no-consumers>
         <max-hops>1</max-hops>
         <discovery-group-ref discovery-group-name="dg-group1"/>
      </cluster-connection>
   </cluster-connections>

   <security-settings>
      <security-setting match="#">
     <permission type="createNonDurableQueue" roles="guest"/>
     <permission type="deleteNonDurableQueue" roles="guest"/>
     <permission type="consume" roles="guest"/>
     <permission type="send" roles="guest"/>
      </security-setting>
   </security-settings>

   <address-settings>
      <!--default for catch all-->
      <address-setting match="#">
     <dead-letter-address>jms.queue.DLQ</dead-letter-address>
     <expiry-address>jms.queue.ExpiryQueue</expiry-address>
     <redelivery-delay>0</redelivery-delay>
     <max-size-bytes>10485760</max-size-bytes>       
     <message-counter-history-day-limit>10</message-counter-history-day-limit>
     <address-full-policy>BLOCK</address-full-policy>
         <redistribution-delay>1000</redistribution-delay>
      </address-setting>
   </address-settings>



</configuration>

JBoss EAP 6 の設定

スタンドアロン-ha.xml

ファイルの主要部分は次のとおりです。

<extensions>
    <extension module="org.jboss.as.clustering.infinispan"/>
    <extension module="org.jboss.as.clustering.jgroups"/>
    <extension module="org.jboss.as.configadmin"/>
    <extension module="org.jboss.as.connector"/>
    <extension module="org.jboss.as.deployment-scanner"/>
    <extension module="org.jboss.as.ee"/>
    <extension module="org.jboss.as.ejb3"/>
    <extension module="org.jboss.as.jaxrs"/>
    <extension module="org.jboss.as.jdr"/>
    <extension module="org.jboss.as.jmx"/>
    <extension module="org.jboss.as.jpa"/>
    <extension module="org.jboss.as.logging"/>
    <extension module="org.jboss.as.mail"/>
    <extension module="org.jboss.as.modcluster"/>
    <extension module="org.jboss.as.naming"/>
    <extension module="org.jboss.as.osgi"/>
    <extension module="org.jboss.as.pojo"/>
    <extension module="org.jboss.as.remoting"/>
    <extension module="org.jboss.as.sar"/>
    <extension module="org.jboss.as.security"/>
    <extension module="org.jboss.as.threads"/>
    <extension module="org.jboss.as.transactions"/>
    <extension module="org.jboss.as.web"/>
    <extension module="org.jboss.as.webservices"/>
    <extension module="org.jboss.as.weld"/>
    <extension module="org.jboss.snowdrop"/>
</extensions>

<interfaces>
    <interface name="management">
        <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
    </interface>
    <interface name="public">
        <inet-address value="${jboss.bind.address:127.0.0.1}"/>
    </interface>
    <interface name="unsecure">
        <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
    </interface>
</interfaces>

<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
    <socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>
    <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
    <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>
    <socket-binding name="ajp" port="8009"/>
    <socket-binding name="http" port="8080"/>
    <socket-binding name="https" port="8443"/>
    <socket-binding name="jgroups-diagnostics" port="0" multicast-address="224.0.75.75" multicast-port="7500"/>
    <socket-binding name="jgroups-mping" port="0" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/>
    <socket-binding name="jgroups-tcp" port="7600"/>
    <socket-binding name="jgroups-tcp-fd" port="57600"/>
    <socket-binding name="jgroups-udp" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>
    <socket-binding name="jgroups-udp-fd" port="54200"/>
    <socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>
    <socket-binding name="osgi-http" interface="management" port="8090"/>
    <socket-binding name="remoting" port="4447"/>
    <socket-binding name="txn-recovery-environment" port="4712"/>
    <socket-binding name="txn-status-manager" port="4713"/>
    <outbound-socket-binding name="mail-smtp">
        <remote-destination host="localhost" port="25"/>
    </outbound-socket-binding>
</socket-binding-group>
4

1 に答える 1

2

それは互換性がありません..新しいライブラリは古いサーバーと通信できません。

HOrnetQ 2.2 までは、プロトコルで異なるバージョンをまったくサポートしていませんでした。また、2.2 以降では互換性を考慮し始めました...そのため、達成しようとしていることが機能しません。

于 2013-02-13T16:45:04.460 に答える