[jboss-jira] [JBoss JIRA] (JBJCA-1109) SimpleResourceAdapterRepository fails to convert RA uniqueId to RA name
Ivo Studensky (JIRA)
jira-events at lists.jboss.org
Fri Oct 25 06:04:01 EDT 2013
Ivo Studensky created JBJCA-1109:
------------------------------------
Summary: SimpleResourceAdapterRepository fails to convert RA uniqueId to RA name
Key: JBJCA-1109
URL: https://issues.jboss.org/browse/JBJCA-1109
Project: IronJacamar
Issue Type: Bug
Components: Core
Affects Versions: 1.1.1.Final, 1.0.21.Final
Reporter: Ivo Studensky
Assignee: Jesper Pedersen
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
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list