Re: Business Objects / COM+ / MTS



Assuming that your transaction only involves database transactions (and not
MSMQ transactions for instance) it doesn't really matter how many assemblies
are involved. If all of those assemblies are installed on the same machine,
then you can pass a SqlTransaction object around to coordinate the business
process. Alternatively you could associate that transaction object with a
context (e.g. HttpContext if you are using Web Services, or the current
Thread) but this is assuming all of your assemblies are in the same
AppDomain.

However you cannot extend the transaction to cross machine boundaries as it
will become a distributed transaction and you will need Enterprise Services
(COM+) so that you can interact with Distributed Transaction Coordinator
(DTC).

The good news in .NET 2.0 is the introduction of System.Transactions
namespace, which will be a great help for managing transactions. It is the
most efficient way of creating transactions as it will start with the bare
minimum (e.g. using the database transaction for start) and will involve
other services like DTC only if necessary.

It also allows you to create your own resource managers (SQL Server and MSMQ
are resource managers too) that can enlist in other transactions.

http://msdn2.microsoft.com/en-us/library/system.transactions(VS.80).aspx

Hope that helps.

--
Mehran Nikoo
MCSD.NET, MCITP, MCSD

"Chris Fink" wrote:

Thanks for your feedback.

I should state that I don't want to assume that this problem only involves
web services. The wsUpdateChecking(amount) and wsUpdateSavings(amount)
could be two seperate assemblies made available through .net remoting (tcp).
The architecture would be as follows (the same as before but with assemblies
rather than web services):

1. Assembly1 contains a method called wsUpdateChecking(amount).
2. Assembly2 contains a method called wsUpdateSavings(amount).

If this were the architecture, could I make them transactional?


"Mehran Nikoo" <MehranNikoo@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A5A17545-D223-457F-AE20-20A186516230@xxxxxxxxxxxxxxxx
But WS-Transactions is not yet implemented, is it?
--
Mehran Nikoo
MCSD.NET, MCITP, MCSD

"Michael Nemtsev" wrote:

Hello Chris,

I recomend to look at WS-Transaction. They have been working on such
issues.

CF> I have a general question on how to implement transactions across
CF> multiple web services using Microsoft and .Net.
CF>
CF> Example: I have two webservices (both are simplified for sake of
CF> example).
CF>
CF> 1. wsUpdateChecking(amount) - this webservice will update the amount
CF> of
CF> money in your checking account.
CF> 2. wsUpdateSavings(amount) - this webservice will update the amount
CF> of money
CF> in your savings account.
CF> The requirement is for a client (webservice consumer) to take $10
CF> from checking and put that $10 into savings. Given the current
CF> design, this would require a call to wsUpdateChecking and a call to
CF> wsUpdateSavings. If either call failed, the entire transaction
CF> should be rolled back.
CF>
CF> My questions are:
CF> 1. Given the requirements and the 2 webservices, how would this
CF> transaction
CF> be accomplished? Does COM+ / MTS offer the ability to manage both
CF> these
CF> objects transactionally when they are two distinct, seperate
CF> services?
CF> ....or would the correct solution involve creating a third
CF> webservice that would call wsUpdateChecking & wsUpdateSavings to
CF> manage the transaction?
CF>
CF> Any help is appreciated.
CF>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do
not
cease to be insipid." (c) Friedrich Nietzsche






.



Relevant Pages

  • Re: Business Objects / COM+ / MTS
    ... CF> I have a general question on how to implement transactions across ... wsUpdateChecking- this webservice will update the amount ... this would require a call to wsUpdateChecking and a call to ... If either call failed, the entire transaction ...
    (microsoft.public.dotnet.distributed_apps)
  • Business Objects / COM+ / MTS
    ... web services using Microsoft and .Net. ... wsUpdateSavings- this webservice will update the amount of money ... Given the requirements and the 2 webservices, how would this transaction ... would call wsUpdateChecking & wsUpdateSavings to manage the transaction? ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: Business Objects / COM+ / MTS
    ... could be two seperate assemblies made available through .net remoting. ... CF> multiple web services using Microsoft and .Net. ... wsUpdateChecking- this webservice will update the amount ... If either call failed, the entire transaction ...
    (microsoft.public.dotnet.distributed_apps)
  • Using COM+ through EnterpriseServices
    ... I am looking for the equivalent of TransactionContext object from COM+ from ... ..NET using EnterpriseServices, since COMSVCS.dll does not provide a primary ... named assemblies). ... "I need to open a COM+ transaction inside an assembly, ...
    (microsoft.public.dotnet.framework)
  • Re: Using COM+ through EnterpriseServices
    ... I need the exact equivalent of what was the ITransactionContext in COM+ ... begin a transaction on each of them, storing the contexts for use when: ... >> named assemblies). ... >> the EnterpriseServices namespace. ...
    (microsoft.public.dotnet.framework)

Loading