-
Bug
-
Resolution: Done
-
Major
-
7.1.0.Beta1
-
None
It seems there is a bug in org.jboss.as.ejb3.component.EJBUtilities#createActivationSpecs() which denies to look up the Resource Adapter when more than one RA deployed to AS have the same package of their impl class. According to the AS server.log, the tests fail in deployment phase due to:
Caused by: java.lang.IllegalStateException: JBAS014332: found more than one RA registered as app-rar at org.jboss.as.ejb3.component.EJBUtilities.createActivationSpecs(EJBUtilities.java:126)
But it seems that tests are configured and packaged right and there really is only one rar deployment with name 'app-rar'. The problem seems to be in the following code snippet from EJBUtilities class where the package of the impl class of found RA is checked against packages of impl classes of other deployed RA's. If there is any RA which begins with the same package name, i.e. its impl class is in the same package or in a subpackage, then the code throws multipleResourceAdapterRegistered exception, although there is only one RA with the specified name.
EJBUtilities#createActivationSpecs() snippet:
boolean found = false; for (String id : ids) { if (id.startsWith(packageName)) { if (!found) { listeners = getResourceAdapterRepository().getMessageListeners(id); found = true; } else { line 126 ---> throw MESSAGES.multipleResourceAdapterRegistered(resourceAdapterName); } } }
In the test case, at the line marked above the 'packageName' is equal to "foo.bar", the 'id' to "foo.bar.baz.XAResourceAdapterImpl#1" and the 'ids' collection to:
ids = {java.util.Collections$UnmodifiableSet@7199} size = 7 [0] = {java.lang.String@7287}"foo.bar.RAImpl#2" [1] = {java.lang.String@7202}"foo.bar.XARAImpl#1" [2] = {java.lang.String@7288}"foo.bar.NoTxRAImpl#1" [3] = {java.lang.String@7289}"foo.bar.XARAImpl#2" [4] = {java.lang.String@7290}"foo.bar.TxImpl#1" [5] = {java.lang.String@7291}"foo.bar.NoTxRAImpl#2" [6] = {java.lang.String@7292}"foo.bar.LocalTxRAImpl#1"
Maybe I did not understand the code above correctly, but to me it seems to be a bug.
- duplicates
-
AS7-2136 Can't wire up MDBs when multiple RARs are deployed
- Resolved