all groups > dotnet component services > september 2003 >
You're in the

dotnet component services

group:

COM+ Transaction


Re: COM+ Transaction Florin Lazar [MSFT]
9/30/2003 11:52:03 AM
dotnet component services:
COM+ and MSDTC don't support nested transactions.

Regards,
--
Florin Lazar - Microsoft

Please do not send email directly to this alias. This alias is for newsgroup
purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


[quoted text, click to view]
Is the COM+ transaction supports nested transaction?
Is any one know how to do it?


COM+ Transaction cllor
9/30/2003 9:32:17 PM
I am trying to use COM+ transaction in a few of components I developed.
I am using the Manual Transaction to control the COMMIT and ROLLBACK of the
transaction.
However, the components not working correctly.
It throw error message "The system trying to abort the aborted transaction
or in the process of aborting transaction"

Is the COM+ transaction supports nested transaction?
Is any one know how to do it?

Re: COM+ Transaction cllor
10/1/2003 1:35:58 PM
Thx for ur reply.


I am new in using transaction.I am facing a problem in using transaction.
This is the situation :

1) I have two component( 1st component(comTrx) is for insert, update,
delete and need transaction, 2nd component(comNonTrx) is for select and
doesn't need transaction )

Now, I have a main component(comMain) that will do Insert(comTrx) ->
Select(comNonTrx) -> Update (comTrx)

First, I let the comMain to handle the transaction by using SetAbort()
and SetComplete() if the comNonTrx and comTrx throw exception.
The comMain work fine.

If I let the comNonTrx and comTrx also involve in handling transaction
( example: when the comTrx throw exception, it will call SetAbort(). )
If I do like that, the system will throw "Transaction has been aborted
by.....".
Why I do like this is because the transaction will lock the database and
I though that it is better to release the transaction as fast as posible.

Is this means that only the component which start the transaction needs
to handle by itself?
If not, how can I handle the transaction?

2) Beside the 3 component, I also need to use another component( AuditLog)
which doesn't need transaction and doesn't need RollBack.

Like (1), comMain will do Insert(comTrx) -> Select(comNonTrx) -> Update
(comTrx) -> AuditLog

I had try to set the AuditLog to NotSupported,Disabled and without any
transaction attribute.
But whenever there is a exception, the AuditLog will also RollBack.

Any idea of how to set the AuditLog not to RollBack?


[quoted text, click to view]

Re: COM+ Transaction cllor
10/1/2003 3:42:34 PM
Hi,

Just to inform, I just try a scenario which is like this:

I had a main component ( comMain) which is a com+ component. And the
comTrx and comNonTrx which is non com+( pure .net component).
The comMain will call the comTrx and comNonTrx to do Insert -> Select ->
Update

Only the comMain will handle the transaction ( if has exception, call
SetAbort(), else SetComplete() )

And my result is the transaction can be RollBack if catch exception.

Is this the suppose way the transaction behave?
Or I had left out some setting?

Because I thought that in order to use com+ transaction, the components
involved need to be inherit from
ServicedComponent and register into Component Services.

[quoted text, click to view]

Re: COM+ Transaction Florin Lazar [MSFT]
10/4/2003 1:06:14 AM
The behavior you are seeing is by design. Your comMain component creates the
transactional com+ context. By calling into other .net objects (that are not
derived from ServicedComponent) you remain in the same com+ context. Which
means that if you are doing database work, it will be part of the
transaction.

Regards,
--
Florin Lazar - Microsoft

Please do not send email directly to this alias. This alias is for newsgroup
purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.

[quoted text, click to view]

AddThis Social Bookmark Button