Transaction sharing between Serviced Components in .Net

luke

Newcomer
Joined
Mar 14, 2003
Messages
3
Location
Montreal
I have a parent and child relationship between two tables Orders and OrderItems.

I have created two classes that inherit from EnterpriseServices.ServicedComponent. The Orders class initiates the transaction (it's class attribute has been set to RequiresNew) and the OrderItems class is instanciated within Orders and particiaptes in the transaction (it's class attribute has been set to Supported). If an error occurs in the OrderItems class an error is thrown back to the Orders class and the transaction is aborted.

Is this the correct approach to take when handling transactions that span multiple objects? Any help would be appreciated.

Thanks,
Luke
 
Back
Top