在域模式下运行时,JBOSS AS 7.1 MDB部署失败(Clustered HornetQ)

时间:2014-08-28 13:55:13

标签: jboss7.x hornetq

当它在JBOSS Standalone模式下部署时,MDB可以正常工作。在群集模式下,部署正在发出错误

 {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.subunit.\"MroExecutorEar.ear\".\"MroExecutor.jar\".component.MroExecutorMDB.CREATEjboss.ra.hornetq-raMissing[jboss.deployment.subunit.\"MroExecutorEar.ear\".\"MroExecutor.jar\".component.MroExecutorMDB.CREATEjboss.ra.hornetq-ra]"]}

POM快照

  

    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-api</artifactId>
        <version>6.0</version>
        <scope>provided</scope>
    </dependency>

   <dependency>
        <groupId>com.nokia.oss</groupId>
        <artifactId>MroCore</artifactId>
        <version>1.0-SNAPSHOT</version>
   </dependency>
   <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
    </dependency>


</dependencies>

<build>
    <plugins>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-ejb-plugin</artifactId>
            <version>2.3</version>
            <configuration>
                <ejbVersion>3.1</ejbVersion>
            </configuration>
        </plugin>
    </plugins>
    <finalName>MroExecutor</finalName>
</build>

代码快照

@MessageDriven(
    activationConfig = { 
            @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
            @ActivationConfigProperty(propertyName = "destination", propertyValue = "jms/queue/MROQueue")
    })

公共类MroExecutorMDB实现MessageListener {

JBOSS AS 7.1.1最终在两个节点中作为Master Slave配置运行

1 个答案:

答案 0 :(得分:0)

问题的根本原因是在域模式下的JBoss AS 7.1.1中,您需要将服务器组中的套接字绑定更改为完全ha-socket

<server-group name="other-server-group" profile="full-ha">
                   <jvm name="default">
                       <heap size="64m" max-size="512m"/>
                   </jvm>
                   <socket-binding-group ref="full-ha-sockets"/> 

以下是JBoss和HornetQ群集的代码和配置 - http://alexpunnen.blogspot.in/2014/09/jboss-as-711-and-hornetq-clustering-in.html