HighTechTalks DotNet Forums  

Question about serviced components and transaction contexts

Dotnet Framework (Component Services) microsoft.public.dotnet.framework.component_services


Discuss Question about serviced components and transaction contexts in the Dotnet Framework (Component Services) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Jim Bancroft
 
Posts: n/a

Default Question about serviced components and transaction contexts - 08-06-2004 , 04:38 PM






Hi everyone,

I think this is a simple one.

I have two VB .Net serviced components using COM+ transactions. The
"parent" class has a transaction attribute of RequiresNew, while the "child"
class has a transaction attribute of Requires. The AutoComplete attribute
has been set on all applicable methods in both classes.

My app creates a parent class and calls a method on it. This method in
turn creates the child and calls one of *its* methods, which opens a
SqlConnection and reads some data from a table. Nothing fancy.

I've been experimenting, and have noticed that if I intentionally "mess
up" the child's data access (by, for instance, reading from a non-existant
table), the transaction still completes-- at according to the COM+
statistics page. I don't see how that could be, unless maybe I'm creating
the child and parent objects incorrectly?

At present, I'm using the New operator to create my parent and child
objects. Is that ok in .Net, or should I use a TransactionContext object
when building them? I've seen code samples use the New operator, so I'm a
little skeptical of changing things, but I'm obviously doing something
wrong.

If what I've described sounds familiar to you, or if you know of any
gotchas I may be stepping on here, I'd love to hear from you. Thanks for
the help.

-Jim








Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.