Login Skip Navigation LinksWilsonORMapper > Forums Search
Demo Version Demo Version
Download and try for yourself a fully working demo version, including sample apps and documentation.  The only limitation is that the demo version only works inside the debugger.

PayPal Subscribe
Get It All for $50 USD:
WebPortal, ORMapper,
Source Code, All Updates
PayPal

User Login User Login
Log In
 
 
Reset Password

Wilson ORMapper Forums Wilson ORMapper Forums : Advanced Topics : system.transaction.transactionscope, webservice, connection pooling on

Date Post
3/26/2007 6:39:47 PM

Testresults show that without connection pooling, the error doesn't appear, all works well.

Are there know issues with connection pooling and the ORMapper?

 

Fedor

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

Hi Paul,

We have used your ORMapper with transactions in a application. It works perfectly.

 At this moment we use your ORMapper with system.transaction.transactionscope, via a webservice, using connection pooling.

To use it with a webservice, we stored the object space in the http context current items collection, like your example. 

We have problems with the transactions. Two errors occur:

"The commit transaction request has no corresponding begin transaction. (Microsoft OLE DB Provider for SQL server)"

"The transaction has aborted"

After an error the webservice gives an error for a few minutes.

"New request is not allowed to start because it should come with valid transaction descriptor"  

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

for this last error we have installed hotfix KB916002. This reduced the frequency of the error, but didn't eliminate it.

The kb article says the cause is a finishing transaction on an open connection.

Could there be a connection in the ORMapper that stays open?

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

We get the error on a testing system with limited resources (only 512MB, slow processor).  

We have also tested without the ORMapper with system.transaction.transactionscope, via a webservice, using connection pooling.

This way we couldn't reproduce the errors above. 

We want to use the ORMApper, because it works perfectly before. 

Is there something we could check in relation with the ORMapper? Or could there be another thing causing these errors? 

Any help appreciated, 

With regards,

 Fedor Kauffman / Sander Prost

 

3/26/2007 6:57:11 PM

Hi Fedor:

Its because using the System.Transaction.TransactionScope is being a little too intrusive here.  Why?  Because I've wrapped the System.Data.IDbTransaction in my own Transaction class to guarantee transactions are left pending, along with their open connections.  In the perfect world that shouldn't happen, but unfortunately I've seen it happen all too often, especially when people don't use try/catch/finally (or using).  But my special handling and the new TransactionScope are probably getting in each other's way here, so you'll mostly likely need to use my Transaction class exclusively.

Thanks, Paul Wilson