Click to See Complete Forum and Search --> : COM+ transactions


hhartman
September 20th, 2001, 04:35 AM
Hi,
I was wondering if when using COM+, if there is one connection to the database per transaction or can every component have a connection for itself?
thanks

nonnb
February 16th, 2002, 06:52 AM
The MS recommendation seems that you connect and disconnect from the DB as quickly as possible.

Let the COM+ TP monitor worry about the 2 phase transaction boundaries, and let the connection pooling worry about performance issues.

Allocating and deallocating connections in the constructors e.g. Activate and Deactivates (if you have IObjectControl implemented) does not seem to be recommended by M$ - it is also tricky to debug if you need to take code out of COM+ for debugging.

Implementing a "singleton" connection to be reused between several component instances sounds frightening.