Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BusinessProcess Transactions
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01183995
Message ID:
01184050
Vues:
19
Darren,

>Hi Guys - and Happy New Year to you all.

And Happy New Year to you too!

>Could someone please point me in the right direction for setting up tranx processing from within a mmBusinessProcess object. I have looked through the previous post and the MM Dev Guide however this didnt really seem to help me.
>
>I have a collection of BizObj that need to participate in the tranx, however there is no parent-child relationship between this business objects. I guess you co0uld say that i have like 5 "parent" business object that need to participate within the same tranx.
>
>I would like to manually control the Begin/Commit/Rollback of the tranx and not use the AutoTranx feature of the MM business objects.

The key is getting all your business objects to use the same connection / transaction object so they all participate in the same transaction. The easiest way to do this is to choose an object to begin the transaction and temporarily register all other objects as children.

If you prefer not to do this, you can choose one object to begin the transaction and register the other objects for the TransactionStateChange event only. If you look at mmBusinessObject.RegisterChildBizObj() you will see this iw what's happening behind the scenes:
this.TransactionStateChange += 
	new mmTransactionStateChangeDelegate(childObject.TransactionStateChangeHandler);
After doing this, you can either use MM .NET automatic transactions or you can do it manually using the methods mentioned in the MM .NET Dev Guide topic "Working with Transactions".

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform