Cannot connect MDB to remote HornetQ server
dimitris Oct 17, 2011 5:46 AMPosting this on behalf of one of our Early Access users - dimitris
I am trying to connect an MDB to a queue on a remote HornetQ server. In AS 6, this could be done by configuring a Netty connector factory in jms-ra.rar/META-INF/ra.xml, but how can we do this on EAP 6 / AS 7?
The best solution would be to configure this in standalone.xml, but I was not able to make this work. An alternative is to deploy our own resource adapter. We tried to package jms-ra.rar from AS 6 into a rar file and deploy it in AS 7. This deployed without errors, but we could not use this resource adapter from our MDB. Then we tried to place the rar file in the EAR, but this gave the following error:
12:57:48,506 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.subunit."casino_integrationEAR.ear"."casino_integration2.jar".component.CasinoIntegrationExample3.CREATE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."casino_integrationEAR.ear"."casino_integration2.jar".component.CasinoIntegrationExample3.CREATE: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1786)
at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_26]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]
Caused by: java.lang.IllegalStateException: No resource adapter registered with resource adapter name jms-ra
at org.jboss.as.ejb3.component.EJBUtilities.createActivationSpecs(EJBUtilities.java:115)
at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentCreateService.createComponent(MessageDrivenComponentCreateService.java:76)
at org.jboss.as.ee.component.BasicComponentCreateService.start(BasicComponentCreateService.java:78)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
... 4 more
I have also tried this in the AS 7 nightly build #1732. First I got another error (see below), then I tried to remove jboss-beans.xml from jms-ra.rar/netty.jar, but then I got the same error as above.
15:29:44,885 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) Starting deployment of "jms-ra.rar"
15:29:45,422 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."jms-ra.rar".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."jms-ra.rar".PARSE: Failed to process phase PARSE of deployment "jms-ra.rar"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_26]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_26] Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Failed to parse POJO xml ["/C:/Users/lars.hoidahl/Desktop/jboss-as-7.1.0.Alpha2-SNAPSHOT/bin/content/jms-ra.rar/netty.jar/META-INF/jboss-beans.xml"]
at org.jboss.as.pojo.KernelDeploymentParsingProcessor.parseDescriptor(KernelDeploymentParsingProcessor.java:146)
at org.jboss.as.pojo.KernelDeploymentParsingProcessor.parseDescriptors(KernelDeploymentParsingProcessor.java:120)
at org.jboss.as.pojo.KernelDeploymentParsingProcessor.deploy(KernelDeploymentParsingProcessor.java:78)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
... 5 more
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[17,1]
Message: Unexpected element '{urn:jboss:bean-deployer:2.0}deployment'
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:98)
at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:59)
at org.jboss.as.pojo.KernelDeploymentParsingProcessor.parseDescriptor(KernelDeploymentParsingProcessor.java:139)
... 8 more