Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COM+ transactions

Status
Not open for further replies.

sm43

Programmer
Dec 1, 2002
155
0
0
US
what object/interface is used in VB 6 MTS/COM+ to make an object transaction capable?


Saad
 
You can use the MTS Explorer to configure transaction support for a component. Right click the component, select Properties then the Transaction tab.

You can also set the default value for a component's transaction setting in VB. The class module has a MTSTransactionMode property. When compiled, VB will place a constant in the object's type library. When a component is added to a MTS package, MTS reads the type library and uses that transaction setting.

MTS doesn't read the type library when components are added from the registered component list, only when added to a package with the Add File dialog. If from the registered components list then you have to configure transaction support manually in MTS Explorer.

Paul Bent
Northwind IT Systems
 
Saad -
You might also make sure you really need COM+ transactions. These are actually DTC (Distributed Transaction Coordinator) events, and are very expensive in terms of system resources. The only time you should need one is when multiple resource managers are involved. A resource would be something like SQL Server, DB/2, MSMQ, or MQSeries.

So if you need data positively written to SQL Server *and* MSMQ, or SQL Server *and* DB/2 then use DTC (aka COM+ transactions). It uses a two-phase commit to make sure that both resources are prepared to write the data. Once both resources indicate they're ready to write, DTC will tell them to proceed. If either of the resources is not ready, then the transaction will be rolled back.

If you only need data written to SQL Server by itself, or DB/2 by itself, then ADO transactions are your best bet. For MSMQ or MQSeries, use a transactional queue, as your data will be written to the message store before being processed, thus ensuring it will get through (non-transactional messages only stay in RAM, can can be lost during a power failure or reboot).

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top