可以使用的方法或函数
|
Consistent Bit
|
Done Bit
|
IObjectControl::SetComplete
|
True
|
True
|
IObjectControl::SetAbort
|
False
|
True
|
IObjectControl::EnableCommit (default)
|
True
|
False
|
IObjectControl::DisableCommit
|
False
|
False
|
IContextState::Get/SetMyTransactionVote
|
|
根据传入参数
|
IContextState::Get/StateDeactivateOnReturn
|
根据传入参数
|
|
缺省(class构造)
|
提交前
|
回滚前
|
暂时不提交
|
提交暂时不提交的
|
IsHappy = true
IsDone = false
|
IsDone = true
|
IsHappy=false
IsDone = true
|
IsDone = false
|
IsDone = true
|
if(CurrentTranscationContext.IsDone)
{
if(CurrentTranscationContext.IsHappy)
{
//done== true && consistent== true
CurrentTranscationContext.Commit();
}
else
{
//
done == true && consistent == false
CurrentTranscationContext.Rollback();
}
CurrentTranscationContext =
null;
}
|