当在域模式下运行时JBOSS AS 7.1 MDB部署失败(集群HornetQ)
问题描述:
在JBOSS Standalone模式下部署时,MDB将起作用。在集群模式下部署给了一个错误当在域模式下运行时JBOSS AS 7.1 MDB部署失败(集群HornetQ)
{"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实现中号essageListener {
作为JBoss 7.1.1作为主从configuraion两个节点最终运行
答
问题的根本原因是,在JBoss AS中域模式7.1.1你需要改变插座的结合服务器组完整-HA-插座
<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