vb.net - Property is reset on COM+ object if ContextUtil.SetComplete() is called -
i've got 2 classes deployed com+ components, let's classa , classb. classa has public properties. classb sets values properties , calls method of classa. method not modify value of property.
after call values of properties reset default values corresponding types. happens if called method includes statement contextutil.setcomplete(). once comment out statetment values of properties remain same before method call, expect.
do overllok basic concept of com+ objects , contexts? expect property value remain same in case.
here's simplified listing code:
option strict off option explicit on imports system.enterpriseservices <transaction(transactionoption.required)> _ public class classa inherits servicedcomponent private _propertya string public property propertya() string return me._propertya end set(byval value string) me._propertya = value end set end property public sub methoda() ' contextutil.setcomplete() ' if called str property reset after return call end sub end class <transaction(transactionoption.required)> _ public class classb inherits servicedcomponent public sub methodb() dim classa = new classa() a.propertya = "a" a.methoda() ' after call value of a.propertya reset nothing if contextutil.setcomplete() called inside methoda() end sub end class
have tried calling commit on transaction, ie: contextutil.mytransactionvote = transactionvote.commit. making changes , setting context complete before changes have been committed.
Comments
Post a Comment