* allControls only contains local controls. Have we seen this
* transaction before, i.e., is it a locally created transaction that we
* are re-importing?
*/
ControlImple cont = ((ControlImple.allControls != null) ? (ControlImple) ControlImple.allControls.get(actUid)
: null);
/*
* We could do optimisations based on whether this is a transaction we
* have locally created anyway and somehow it is being re-imported. If
* that is the case, then why create a new transaction to manage it -
* this will only add to the disk access? However, currently we cannot
* do this optimisation because:
*
* (i) if the original control is being terminated from a remote
* process, it will not be able to force thread-to-transaction
* association (ArjunaTransactionImple et al don't do that.)
*
* (ii) certain AIT records require thread-to-transaction association in
* order to work (e.g., LockRecord).
*
* What this means is that if we do this optimisation and an application
* uses AIT, all AIT records will be added to the parent (original)
* transaction and not the interposed transaction (which does do
* thread-to-transaction association - or the resource does). Then when
* the transaction is terminated, these records will be processed and
* they will not be able to determine the current transaction.
*/
if (cont != null)
{
_isWrapper = true;
_transactionHandle = cont.getImplHandle();
Coordinator coord = null;
Terminator term = null;
try
{
coord = cont.get_coordinator();
term = cont.get_terminator();
}
catch (Exception e)
{
e.printStackTrace();