-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
1.0.21.Final, 1.1.1.Final
-
None
SimpleResourceAdapterRepository compares a given ResourceAdapter class with resource adapters from MetadataRepository just by their class names. So if there are 2 separate RAs deployed in the server both with the same ResourceAdapter class (e.g. org.hornetq.ra.HornetQResourceAdapter), it randomly takes one of those and cannot safely distinguish them.
3 places affected by this:
1. #getMessageListeners() [1]
2. #getEnpoint() because of usage of getMDRIdentifier [2] [3]
3. #getResourceAdapters() [4]
I used a dirty hack to work around this issue which changes API and doesn't fix #3, see [5] + a few changes according to [5] in WF's EJBUtilities.
A possible fix could be to "encode" the RA name into its uniqueId, so that such a uniqueId would contain RA class name, RA name and eventually a counter (increasing number).
[1] https://github.com/ironjacamar/ironjacamar/blob/1.1/core/src/main/java/org/jboss/jca/core/rar/SimpleResourceAdapterRepository.java#L367
[2] https://github.com/ironjacamar/ironjacamar/blob/1.1/core/src/main/java/org/jboss/jca/core/rar/SimpleResourceAdapterRepository.java#L316
[3] https://github.com/ironjacamar/ironjacamar/blob/1.1/core/src/main/java/org/jboss/jca/core/rar/SimpleResourceAdapterRepository.java#L538
[4] https://github.com/ironjacamar/ironjacamar/blob/1.1/core/src/main/java/org/jboss/jca/core/rar/SimpleResourceAdapterRepository.java#L251
[5] https://github.com/istudens/ironjacamar/commit/0f716538ea91e2b547f83f41c67c554e3d1383db
- relates to
-
WFLY-2384 2 RAs with the same ResourceAdapter classes do not work (they overlap in JCA internals)
-
- Open
-