Bug 1012044
Summary: | resource-adapter id attribute has to match ra name otherwise MDB is not deployed | ||
---|---|---|---|
Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Ondrej Chaloupka <ochaloup> |
Component: | JCA | Assignee: | Stefano Maestri <smaestri> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Ondrej Chaloupka <ochaloup> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.2.0 | CC: | brian.stansberry, dandread, jawilson, jdoyle, jpederse, mnovak, msvehla, myarboro, pslavice, smcgowan |
Target Milestone: | CR1 | Keywords: | Regression |
Target Release: | EAP 6.2.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-12-15 16:21:42 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1026924 |
Description
Ondrej Chaloupka
2013-09-25 15:26:42 UTC
There needs to be an upstream JIRA (WFLY), and ideally a test case I need to add: this was hit on EAP 6.2.0.ER3 I've send a PR for this https://github.com/jbossas/jboss-eap/pull/501 I still get the failure for EAP 6.2.0.ER6. I've checked the code and the PR https://github.com/jbossas/jboss-eap/pull/501 seems to be applied in the ER6. I also tested this scenario on resource adapter, included as module. There is the same problem: if id attribute isn't equal to module name e.g. "org.jboss.something", MDB deployment fails also. Changing ER6 to ER7 in case it makes it. This was not fixed. When I use the same rar name for archive and id and mdb link then I get exception [1] (I'm working with activemq). The only way how to really load the RAR I have to define names in the following way: <subsystem xmlns="urn:jboss:domain:ejb3:1.4"> <mdb> <resource-adapter-ref resource-adapter-name="activemq.rar"/> <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/> </mdb> ... <subsystem xmlns="urn:jboss:domain:resource-adapters:1.1"> <resource-adapters> <resource-adapter id="activemq"> <archive>activemq.rar</archive> ... which means that archive has to be archive.rar and the id just archive. [1] ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."jbossts_crashrecovery-jms-mdb_crashrecovery-jms-mdb.jar".component.mdb.CREATE: org.jboss.msc.service.StartException in service jboss.deployment.unit."jbossts_crashrecovery-jms-mdb_crashrecovery-jms-mdb.jar".component.mdb.CREATE: Failed to start service at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45] at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45] Caused by: java.lang.IllegalStateException: JBAS014331: No resource adapter registered with resource adapter name activemq at org.jboss.as.ejb3.component.EJBUtilities.createActivationSpecs(EJBUtilities.java:85) at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentCreateService.createComponent(MessageDrivenComponentCreateService.java:93) at org.jboss.as.ee.component.BasicComponentCreateService.start(BasicComponentCreateService.java:91) at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentCreateService.start(MessageDrivenComponentCreateService.java:79) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1] ... 3 more Stefano, are you looking at it? This is the final week to get fixes for CR, which should hopefully be the last build. There are EAP 6 ER7 TCK failures in the connector/localTx/msginflow and ejb/bb/mdb/customerlistener tests are related to this issue. New PR sent https://github.com/jbossas/jboss-eap/pull/689 Ok, it seems that this works for creating modules but this does not work for archive deployments. You have to set the id of resource adapter to name of archive with or without ".rar". Otherwise the rar is not loaded for the MDB. But I would suppose that it should be possible to set whatever string to the id. At least it worked in EAP 6.1.1.GA. When you configure resource adapter as archive then you can set it like: <subsystem xmlns="urn:jboss:domain:ejb3:1.4"> <mdb> <resource-adapter-ref resource-adapter-name="activemq.file.rar"/> <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/> </mdb> ... <subsystem xmlns="urn:jboss:domain:resource-adapters:1.1"> <resource-adapters> <resource-adapter id="activemq.file"> <!-- OR <resource-adapter id="activemq.file.rar"> --> <archive>activemq.file.rar</archive> Well starting w/ your example I've just tried those 3 config: <subsystem xmlns="urn:jboss:domain:ejb3:1.4"> <mdb> <resource-adapter-ref resource-adapter-name="wmq.jmsra.rar"/> <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/> </mdb> ... <subsystem xmlns="urn:jboss:domain:resource-adapters:1.1"> <resource-adapters> <resource-adapter id="wmq.jmsra"> <archive>wmq.jmsra.rar</archive> <subsystem xmlns="urn:jboss:domain:ejb3:1.4"> <mdb> <resource-adapter-ref resource-adapter-name="wmq.jmsra.rar"/> <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/> </mdb> ... <subsystem xmlns="urn:jboss:domain:resource-adapters:1.1"> <resource-adapters> <resource-adapter id="wmq.jmsra.rar"> <archive>wmq.jmsra.rar</archive> <subsystem xmlns="urn:jboss:domain:ejb3:1.4"> <mdb> <resource-adapter-ref resource-adapter-name="ibm-resource-adapter"/> <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/> </mdb> ... <subsystem xmlns="urn:jboss:domain:resource-adapters:1.1"> <resource-adapters> <resource-adapter id="ibm-resource-adapter"> <archive>wmq.jmsra.rar</archive> All of them worked for me (EAP 6.x branch) What am I not covering? Hi Stefano, You are right and the fix works well. I'm sorry for not putting my intention clearly. I failed the issue from the point of view of the regression against the EAP 6.1.1.GA. In the past release there was needed to use archive name as pointer for the mdb resource adapter name. I mean this works under 6.1.1 (and does not work for 6.2.0). <subsystem xmlns="urn:jboss:domain:ejb3:1.4"> <mdb> <resource-adapter-ref resource-adapter-name="wmq.jmsra.rar"/> <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/> </mdb> ... <subsystem xmlns="urn:jboss:domain:resource-adapters:1.1"> <resource-adapters> <resource-adapter id="wmq-jms-ra-id-name"> <archive>wmq.jmsra.rar</archive> This regression was the original reason of filling this bug. Neverless the prior fix came with another type of problem I was still thinking about the original one. If you consider the current behavior correct then I'm fine with verify the issue. I just worried about different behavior between EAP 6.1.1 and 6.2.0 versions. Thanks Ondra Yup, current behavior is the correct one. It's because you could have more than one resource-adapter pointing on the same rar, and so it's clear that we have to use id and not rar name to point the ra. And we can't do any special case for single resource-adapter because we can't know if and when a user decide to add an activation runtime (including ironjacamar.xml in rar, or using CLI) regards S. OK, thank you. In this way it works fine. |