bool prepared = false;
Transaction tx;
IEnlistmentNotification enlisted;
- //WaitHandle waitHandle;
+ WaitHandle waitHandle;
+ Exception ex;
internal PreparingEnlistment (Transaction tx, IEnlistmentNotification enlisted)
{
this.tx = tx;
this.enlisted = enlisted;
- //waitHandle = new ManualResetEvent (false);
+ waitHandle = new ManualResetEvent (false);
}
public void ForceRollback ()
ForceRollback (null);
}
+ internal override void InternalOnDone ()
+ {
+ this.Prepared();
+ }
+
[MonoTODO]
public void ForceRollback (Exception ex)
{
tx.Rollback (ex, enlisted);
- /* See test RMFail2
- ((ManualResetEvent) waitHandle).Set (); */
+ /* See test RMFail2 */
+ ((ManualResetEvent) waitHandle).Set ();
}
[MonoTODO]
public void Prepared ()
{
prepared = true;
- /* See test RMFail2
- ((ManualResetEvent) waitHandle).Set ();*/
+ /* See test RMFail2 */
+ ((ManualResetEvent) waitHandle).Set ();
}
[MonoTODO]
get { return prepared; }
}
- /*internal WaitHandle WaitHandle {
+ internal WaitHandle WaitHandle {
get { return waitHandle; }
- }*/
+ }
+
+ internal IEnlistmentNotification EnlistmentNotification
+ {
+ get { return enlisted; }
+ }
+
+ // Uncatched exceptions thrown during prepare will
+ // be saved here so they can be retrieved by TM.
+ internal Exception Exception
+ {
+ get { return ex; }
+ set { ex = value; }
+ }
}
}