Closed klr8 closed 7 years ago
Having looked at the source code a bit more I indeed see that for instance the Recoverer class looks up a resource using the unique name that it gets from the journal (TransactionLogRecord / DanglingTransaction).
If I understand things correctly, this implies:
Both your statements are correct. For completeness sake I would also add that the configured serverId must also stay unchanged "for eternity".
Fortunately, BTM is reasonably lenient in case you changed one of those names by mistake. As long as you did not use resource A's name for an unrelated B resource -in which case the recoverer would try to reapply totally unrelated transactions and would log heuristic errors- once you restore the names to their original value, the recoverer will manage to resume everything as it should, thanks to its ability to perform incremental recovery. I wouldn't advise to rely on that, though.
If you feel the need to rename anything, just make sure to exit properly so that no resource has any in-doubt transaction, then simply delete the existing journal fragments.
Thanks for confirming that!
Each XAResourceProducer needs to have a unique name that is used by the ResourceRegistrar to keep track of the resource. The JavaDoc of XAResourceProducer simply says:
The JavaDoc of ResourceBean additionally states:
What exactly does this mean?