> beforeCompletion will be called at all servers before the transaction completes
That's a bit over simplistic. beforeCompletion is not necessarily called on rollback only tx. Further, in distributed tx, rollback only is actually a local property - branches of the tx at some nodes may be considered rollback only whilst others in the same tx are not. So you can actually get weird situations in which beforeCompletion runs at some nodes but not others. Fun, isn't it. :-)
see also JBTM-496