Web Services participating in COM+ transactions

A

alien2_51

I have a collection of related data access members that provide data
manipulation capabilities to a business object. Each business object has its
own web service that exposes methods for finding, loading and saving data
back to the datasource. Inside the save method I use an ADO.NET connection
and transaction controller class for managing the ADO.NET transaction. What
I would like to do is be able to control the transaction from the business
object which is up/out another layer, I want to be able to create another
business object that encapsulates other existing business objects using the
same architecture and use COM+ to control the transaction. Is this
possible....??? What are the steps to set this up...? Do I have to register
my web service in COM+...?

Thanks!!!

Dan
 
S

Steffen Ramlow

alien2_51 said:
I have a collection of related data access members that provide data
manipulation capabilities to a business object. Each business object
has its own web service that exposes methods for finding, loading and
saving data back to the datasource. Inside the save method I use an
ADO.NET connection and transaction controller class for managing the
ADO.NET transaction. What I would like to do is be able to control
the transaction from the business object which is up/out another
layer, I want to be able to create another business object that
encapsulates other existing business objects using the same
architecture and use COM+ to control the transaction. Is this
possible....??? What are the steps to set this up...? Do I have to
register my web service in COM+...?


AFAIK, WSs do not support transaction. So you are right that your tx must be
controlled by a single root component. This component has to create a tx and
the other components, called from that one, has to enlist into that tx. One
can achieve this by making these components com+ components.

P.S. you cannot register a WS in COM+. But you can make a COM+ app to a WS
by a single click (needs COM+ 1.5).
 
A

alien2_51

So if I'm understanding you correctly something like this would not work....
Particularly this line...
<Transaction(TransactionOption.Supported), _

Imports System

Imports System.Data

Imports System.Data.SqlClient

Imports System.Web.Services

Imports MNCAppServices

Imports MNCDALLibrary

Imports System.EnterpriseServices

<Transaction(TransactionOption.Supported), _

System.Web.Services.WebService(Namespace:="http://tempuri.org/MNCBDOService/
CustomerContact")> _

Public Class CustomerContact

Inherits System.Web.Services.WebService

My CustomerContact business object is built around a dataset, in my dataset
I have Contacts, Attachments, Memos,Complaints all seperate data entities
represented as datatables. My web service is interested in finding entites,
loading entites into a dataset and taking data from the dataset and
reconciling it back to the datasource using my datalayer, no business rules
at this layer, another object communicates with the web service has methods
for acting on its local data cache and makes calls to its web service to
find, load and save data... What I would like to do is create another object
that may use one or more of these business object and wrap it all in one
transaction using a ServiceComponent... Is using a web service the right way
to go in this scenerio...? Based on your response I'm thinking not... Is the
alternative to this to use remoting rather than the web service layer....?



Thanks,

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top