Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is MTS ready or not?
Message
From
07/05/1998 11:18:13
 
 
To
07/05/1998 08:55:58
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00097471
Message ID:
00097702
Views:
23
>>Are you using the Context object ?
>
>I use it for the main function. I find that to be a pain to have to code all this in each function.
>

OK, that's one problem.
Yes it's a pain but it's the way to tell MTS to use the function in the context of the transaction and to pool the ressources.
In a word: you MUST code the Context object in all functions/Subs that you call.

>>Are each part of the transaction stateless (each part not aware of the others) ?
>
>There is a chaining call between them.

That could also be a problem.
You must do something like this:

Transaction: transfert 100$ from checking account to saving account.
Object: Banking. Use the Context object.

Methods: WithDraw() and Add()
Use the Context object in each one telling it to be in the context of the Banking transaction.
Open your connection. Do your stuff. Close your connection.
Tell the Context object if you were successfull or not.

Do NOT share a connection (or database) between the Banking object and both Methods. Each must be stateless (not aware of each other).


Hope this make sense.
Guy Barrette, MCSD
============
Blog http://weblogs.asp.net/guybarrette
Microsoft Regional Director, Montreal, Canada www.microsoft.com/rd
MVP, ASP.NET http://mvp.support.microsoft.com/
President, Montreal Visual Studio User Group www.guvsm.net
INETA Regional Rep for Quebec www.ineta.org
UniversalThread Magazine Columnist (.NET Books Review Column) www.utmag.com
Tech Chair French Track, DevTeach 2004 & 2005 www.devteach.com
Business Architect, Microsoft Team - Nurun Inc www.nurun.com
XBox Live Gamer Tag: Slomo QC CA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform