473,287 Members | 1,904 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

How to initiate a transaction without deriving from ServicedCompon

Here are my requirements of the web service (.NET 1.1, XP/2003)

(1) It needs to call a COM+ application that has already been written and
deployed. The web service essentially becomes a client to the COM+
application.

(2) The web service needs to initiate a new transaction when calling the
COM+ application, then it needs to complete or abort EXPLICITLY.

A million dollar question.....

How can I do this? My web service class is obviously derived from
System.Web.Services.WebService. I have a web method decorated with
TransactionOption.RequiresNew. The web method calls the COM+ application to
write stuff to database. I know that if the web method returns normally, the
transaction is implicitly complete. Likewise, if an exception is thrown, the
transaction is implicitly aborted. However, I must write the code EXPLICITLY
and say "abort transaction" even when there is no exception being thrown in
the web method.

I simply inserted "ContextUtil.SetAbort()" (from System.EnterpriseServices
namespace) where I wanted to explicitly abort the transaction within the web
method. But I got an error (There is no MTS object context).

This is not about writing a COM+ component so I don't think I need to write
a custom class deriving from ServicedComponent (this is impossible to do with
the web service anyways since the web service class itself is already derived
from System.Web.Services.WebService as mentioned before). Rather, this is
about writing a COM+ client from within a web service.
Nov 23 '05 #1
0 1094

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: DotNetJunkies User | last post by:
I am writing a distributed transaction code. My current scenario include a client database(Suppose client- having 4 main database) which can be installed anywhere which would connect to a public...
1
by: Avanish Pandey | last post by:
Hello All We have 3 differen services (in 3 different server) Service A,B,C . We want to implement distributed transaction when call methods of B and C from A. Is it possible? if yes then how? ...
2
by: Robin Tucker | last post by:
I have a query batch "update" script that upgrades my users database from, say version 0 to version 1, or from version 1 to version 2. I would like to know how I can wrap the entire script in a...
2
by: Larry | last post by:
how to use a class variable without initiate for example: ClassA { int var1; }
9
by: John Sidney-Woollett | last post by:
Is it possible to use the dblink and dblink_exec features from inside pl/pgsql functions to mimic the behaviour of nested transactions by calling another function or executing some SQL via the...
14
by: Jim Michaels | last post by:
mysql_query("START TRANSACTION", $link2); $q2=mysql_query("SELECT pictures.pid AS pid FROM pictures,counter WHERE pictures.pid>counter.pid LIMIT 1", $link2); if ($row2=mysql_fetch_assoc($q2)) {...
1
by: Matik | last post by:
Hi to all, Probably I'm just doing something stupid, but I would like you to tell me that (if it is so), and point the solution. There ist the thing: I' having a sp, where I call other sp...
2
by: Martin Z | last post by:
I'm using the TableAdapterHelper to set the connection and transaction properties on all the commands of all my typed table adapters.... I've checked at the time of the error and all the commands...
1
ADezii
by: ADezii | last post by:
Transaction Processing is a Database term that refers to the process of grouping changes to your data into a batch that is treated as a single, atomic unit. Either the entire batch of transactions...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.