COM transactions broken after performance tuning....HELP!

I ran the 2005 performance issue monitoring on all projects within our solution -- which includes deployments in DTC going into SQL Server 2000.

My first run came up with a number of methods that could have been marked STATIC but I then found that it whacks our context for running the method. So we marked each one of these to suppress the warning. At the same time I changed many internal calls that created instances to callclass.Instance.methodto execute methods that were wanted.

We get some transactions to run but others lead to the TransactionInDoubtException or a fault trying to execute a transaction that was aborting or aborted.

Question 1: will having both the Suppress attribute and the AutoComplete attribute on a method cause a problem with COM+?

Question 2: the way we minimized the object creation on the server side was to implement this:

staticBatchAdapter instance;

publicstaticBatchAdapter Instance

{get{if ( instance ==null )instance =newBatchAdapter();

return instance;}}

this allowed me to change the calls to do BatchAdapter.Instance.Mymethod(parms). Will this change hose COM+ or do I have to change this to always return a new instance?

Any rapid help would be greatly appreciated.

[1713 byte] By [MichaelEber] at [2007-12-24]
# 1

Hi Michael,

Static methods and objects don't play well with EntepriseServices components. See http://www.gotdotnet.com/team/xmlentsvcs/esfaq.aspx#1.4 for more details.

HTH

FlorinLazar-MSFT at 2007-8-31 > top of Msdn Tech,Software Development for Windows Vista,Transactions Programming...

Software Development for Windows Vista

Site Classified