}
catch (Exception e)
{
}
throw new TRANSACTION_ROLLEDBACK();
}
currentAction.addChild((ServerStrictNestedAction) nestedAction);
currentAction = nestedAction;
}
}
else
{
/*
* Hierarchies may be identical.
* Remember to check!
*/
}
Uid currentUid = Utility.otidToUid(context.current.otid);
/*
* currentAction points to the parent of the 'current'
* transaction, i.e., the last element in the TransIdentity
* structure. So, ask it if the sent hierarchy's child is
* one of its children.
*/
nestedAction = currentAction.getChild(currentUid);
if (nestedAction == null)
{
/*
* Different notion of current in sent hierarchy.
* So, add it to the hierarchy here.
*/
control = currentAction.control();
/*
* Now deal with the current transaction.
*/
TransIdentity currentID = context.current;
control = ServerFactory.create_subtransaction(currentUid, currentID.coord, currentID.term, control);
nestedAction = new ServerStrictNestedAction(control, true);
if (!nestedAction.valid())
{
/*
* Just deal with current transaction. Others must have been
* registered successfully, and will be deal with automatically
* when the parent transaction terminates.
*/
try
{
((ServerStrictNestedAction) nestedAction).rollback(); // does dispose as well!
nestedAction = null;
}
catch (Exception e)
{
}
throw new TRANSACTION_ROLLEDBACK();
}
currentAction.addChild((ServerStrictNestedAction) nestedAction);
}
else