With fix of the https://issues.jboss.org/browse/JBTM-860 there was added method getJndiName for XAResourceWrapper: https://github.com/jbosstm/jboss-transaction-spi/blob/master/src/main/java/org/jboss/tm/XAResourceWrapper.java#L56
which Narayana uses to resolve situation when there is in-doubt record at the side of resource manager (message broker) but Narayana does not have corresponding record in its log store. This could mean the transaction was already committed. But Narayana needs to pair the in-doubt transaction with existing RM to assume so.
This capability would be fine to be provided by generic jms ra too.