Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is MTS ready or not?
Message
From
07/05/1998 11:53:35
 
 
To
07/05/1998 11:18:13
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00097471
Message ID:
00097720
Views:
21
>>>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.

Ok, I'll do that. Of course, it could be easier if VB would be OOP so I wouldn't have to code this in each function as well as the error handler. This is about 20 lines for each function.

>>>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).

Thanks for the info.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform