J
Jim Bancroft
I'm having some trouble mixing "AutoComplete" attributes and transactions
with my VB .Net components.
Right now, I have two classes --a "parent" and "child"-- that inherit from
the .Net "ComponentServices" class. The parent class creates a new
transaction context (using a Transaction attribute) and calls the child
class, which participates in the transaction as it opens a SqlConnection to
a database and reads the contents of a table. Both classes have the
AutoComplete attribute set on them.
The problem for me comes when a transaction is supposed to fail. I've
modified my child class so that it tries opening an incorrectly-spelled
table, which triggers an exception. The Catch statement in the child
component is entered, but the transaction appears to complete, at least
according to the transaction statistics page in the COM+ explorer? As I
understand it, the AutoComplete attribute is supposed to abort the
transaction when an exception occurs, but it doesn't appear to be the case
here.
Am I missing a step or have I done something wrong? Do I have to vote
against the transaction my child class's exception handler, and if so,
doesn't that work against the notion of an AutoComplete attribute? Thanks
for your advice.
-Jim
with my VB .Net components.
Right now, I have two classes --a "parent" and "child"-- that inherit from
the .Net "ComponentServices" class. The parent class creates a new
transaction context (using a Transaction attribute) and calls the child
class, which participates in the transaction as it opens a SqlConnection to
a database and reads the contents of a table. Both classes have the
AutoComplete attribute set on them.
The problem for me comes when a transaction is supposed to fail. I've
modified my child class so that it tries opening an incorrectly-spelled
table, which triggers an exception. The Catch statement in the child
component is entered, but the transaction appears to complete, at least
according to the transaction statistics page in the COM+ explorer? As I
understand it, the AutoComplete attribute is supposed to abort the
transaction when an exception occurs, but it doesn't appear to be the case
here.
Am I missing a step or have I done something wrong? Do I have to vote
against the transaction my child class's exception handler, and if so,
doesn't that work against the notion of an AutoComplete attribute? Thanks
for your advice.
-Jim