BizTalk Server General - DirectStream in com+ transactio

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > August 2005 > DirectStream in com+ transactio





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author DirectStream in com+ transactio
siddhath

2005-08-03, 8:48 pm

Hi All,
Does DirectStream BAM API class participate in com+ transactions?
I am using directstream class to insert/update BAM data.

I want "UpdateDB1() ,BAMServer.InitiateBaming(MyObject); and UpdateDB2()
" to all be successful or fail.

I am using com+ for this.

but i am not sure if directstream will participate in com+ transaction


1)will following code work and give me the com+ (Acid) behavior?


2)Also I see this error once in while under load ...

"The transaction has already been implicitly or explicitly committed or
aborted"

this sporadic .If i submit 100 requests 80 may work fine 20 may throw this
error?


If I remove BAMServer.InitiateBaming(MyObject); this call from my main
function “PerformUpdations()”everything works fine.

any ideas ?
Thanks
siddharth
========================================
========

---Client For first calss-----------

TransactionalUtil t = new TransactionalUtil ()
t.PerformUpdations();

----------------------------


----------First classs-------------------------------


[Transaction(TransactionOption.RequiresNew)]
public class TransactionalUtil : ServicedComponent
{
public void PerformUpdations()
{
try{

UpdateDB1() //updates databse1 using ADO.net object
BizUtils BAMServer = new BizUtils();
BAMServer.InitiateBaming(MyObject);
UpdateDB2() //updates databse2 using ADO.net object

if(ContextUtil.IsInTransaction)
{
ContextUtil.SetComplete();
}
}
catch(System.Exception ex)
{

if(ContextUtil.IsInTransaction)
{
ContextUtil.SetAbort();
}

}
}

}





------------------------------------------------------




----------Second classs-------------------------------
[Transaction(TransactionOption.Required)]
public class BizUtils : System.EnterpriseServices.ServicedComponent
{
//static DirectEventStream es;
DirectEventStream es;

public void InitiateBaming(object obj)
{
//string stringData ;
try
{


interceptor.OnStep(BAMServer.BizUtils.dataExtractor,"TrackWorkItem",obj,es);
...........

}
catch(System.Exception ex)
{
throw ex;
}


}


}

------------------------------------------------------



========================================
============

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com