Failure to commit database inserts by child mts component 
Author Message
 Failure to commit database inserts by child mts component

Hello,

I have the following situation:

A client calls Component 1 (which is set up to require
transactions).

Component 1 creates an object context using GetObjectContext.

Component 1 creates a component called Component 2 (which is set up
to support transactions).

Component 2 creates an object context using GetObjectContext.

Component 2 writes some data to a database.

Component 2 calls SetComplete, and passes control back to Component 1.

Component 1 calls SetComplete, and passes control back to the client,
which then terminates.

I would expect that the inserts done by Component 2 should show
up in the database; however, this is not the case. However, when
Component 2's properties are changed so that it now no longer
supports transactions, these inserts now show up in the database,
as if there is something about the transaction that is not completing
when it *is* set up to support transactions.

I would appreciate any thoughts on what areas I should check to
find out what the problem is.

Regards,

Akin.

akin at aksoto dot idps dot co dot uk



Tue, 23 Dec 2003 00:29:45 GMT  
 Failure to commit database inserts by child mts component

Quote:

>Hello,

>I have the following situation:

>A client calls Component 1 (which is set up to require
>transactions).

>Component 1 creates an object context using GetObjectContext.

>Component 1 creates a component called Component 2 (which is set up
>to support transactions).

>Component 2 creates an object context using GetObjectContext.

>Component 2 writes some data to a database.

>Component 2 calls SetComplete, and passes control back to Component 1.

>Component 1 calls SetComplete, and passes control back to the client,
>which then terminates.

>I would expect that the inserts done by Component 2 should show
>up in the database; however, this is not the case. However, when
>Component 2's properties are changed so that it now no longer
>supports transactions, these inserts now show up in the database,
>as if there is something about the transaction that is not completing
>when it *is* set up to support transactions.

>I would appreciate any thoughts on what areas I should check to
>find out what the problem is.

OK, it seems the problem was that Component 2 doing one release too many,
and this was messing up the transaction. Does anyone know what happens if
release is called too many times on an interface pointer?

Akin

akin at aksoto dot idps dot co dot uk



Wed, 24 Dec 2003 06:09:31 GMT  
 Failure to commit database inserts by child mts component
A crash somewhere (not necesarrily in the faulty code!)...

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================


Quote:




Quote:
> >Hello,

> >I have the following situation:

> >A client calls Component 1 (which is set up to require
> >transactions).

> >Component 1 creates an object context using GetObjectContext.

> >Component 1 creates a component called Component 2 (which is set up
> >to support transactions).

> >Component 2 creates an object context using GetObjectContext.

> >Component 2 writes some data to a database.

> >Component 2 calls SetComplete, and passes control back to Component 1.

> >Component 1 calls SetComplete, and passes control back to the client,
> >which then terminates.

> >I would expect that the inserts done by Component 2 should show
> >up in the database; however, this is not the case. However, when
> >Component 2's properties are changed so that it now no longer
> >supports transactions, these inserts now show up in the database,
> >as if there is something about the transaction that is not completing
> >when it *is* set up to support transactions.

> >I would appreciate any thoughts on what areas I should check to
> >find out what the problem is.

> OK, it seems the problem was that Component 2 doing one release too many,
> and this was messing up the transaction. Does anyone know what happens if
> release is called too many times on an interface pointer?

> Akin

> akin at aksoto dot idps dot co dot uk



Wed, 24 Dec 2003 08:45:59 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. To commit a query using API call of Solid Database in C

2. When to commit object model to a database?

3. Jet Transactions not committing to database file

4. VC6++: a Link error in a MTS component using ADO1.5

5. Is there any way to achieve multithreading inside MTS COM components

6. Holding a list within a transactional MTS component

7. Threading Model of MTS-based ATL components

8. Threading model for MTS components

9. Debug MTS Component in Windows 2000

10. Passing an external ADO connection into an MTS component

11. Only 1 record added using MTS component

12. Problems using OLE DB in MTS component

 

 
Powered by phpBB® Forum Software