public static Propagation adaptPropagation(Propagation propagation,RecoveryCoordinator adaptor){
  Stack<CompositeTransaction> lineage=propagation.getLineage();
  CompositeTransaction remote=(CompositeTransaction)lineage.peek();
  CompositeTransaction ct=new CompositeTransactionAdaptor(lineage,remote.getTid(),remote.isSerial(),adaptor);
  lineage.pop();
  lineage.push(ct);
  return new PropagationImp(lineage,propagation.isSerial(),propagation.getTimeOut());
}

public static Propagation adaptPropagation ( Propagation propagation , RecoveryCoordinator adaptor ) { Stack < CompositeTransaction > lineage = propagation . getLineage ( ) ; CompositeTransaction remote = ( CompositeTransaction ) lineage . peek ( ) ; CompositeTransaction ct = new CompositeTransactionAdaptor ( lineage , remote . getTid ( ) , remote . isSerial ( ) , adaptor ) ; lineage . pop ( ) ; lineage . push ( ct ) ; return new PropagationImp ( lineage , propagation . isSerial ( ) , propagation . getTimeOut ( ) ) ; }
create a new instance . this method replaces the lowest ancestor by an adaptor ( interposition ) for both efficiency and correct replay handling . implementations of importingtransactionmanager should use this method to convert an incoming propagation into the proper local instance , or replay requests will not work properly .
