try {
String tid = tidmgr_.get ();
boolean serial = context.isSerial ();
Stack lineage = context.getLineage ();
if ( lineage.empty () )
throw new SysException (
"Empty lineage in propagation: empty lineage" );
Stack tmp = new Stack ();
while ( !lineage.empty () ) {
tmp.push ( lineage.pop () );
}
CompositeTransaction root = (CompositeTransaction) tmp.peek ();
while ( !tmp.empty () ) {
lineage.push ( tmp.pop () );
}
CompositeTransaction parent = (CompositeTransaction) lineage
.peek ();
synchronized ( shutdownWaiter_ ) {
synchronized ( getLatch ( root.getTid () ) ) {
cc = getCoordinatorImp ( root.getTid () );
if ( cc == null ) {
RecoveryCoordinator coord = parent
.getCompositeCoordinator ()
.getRecoveryCoordinator ();
cc = createCC ( coord, root.getTid (), orphancheck,
heur_commit, context.getTimeOut () );
}
cc.incLocalSiblingCount (); // for detection of orphans
}
}
ct = createCT ( tid, cc, lineage, serial );
} catch ( Exception e ) {
errors.push ( e );
e.printStackTrace ();
throw new SysException ( "Error in recreate.", errors );
}
return ct;
}