IObjectContext.SetAbort, IObjectContext.SetComplete Methods Example
import com.ms.mtx.*;
boolean success = false;
// Do some work here.
// If the work was successful, call SetComplete
if (success)
MTx.GetObjectContext().SetComplete();
// Otherwise, call SetAbort.
else
MTx.GetObjectContext().SetAbort();