Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] TransactionScope #26

Open
RoyC-Retail-Assist opened this issue Oct 12, 2018 · 3 comments
Open

[Question] TransactionScope #26

RoyC-Retail-Assist opened this issue Oct 12, 2018 · 3 comments

Comments

@RoyC-Retail-Assist
Copy link

Has anyone reliably managed to get TransactionScope working with the iAccess ADO.Net provider?

@nsarris
Copy link
Contributor

nsarris commented Oct 28, 2018

I tried with the DB2Connect driver that supports it but is seems to esclate to XA transation from the first one. If the transaction is not commited or rolled back (process stop, debug stop crash) this leaves lingering transations on the i series that need to be stopped in console. An IBM advisor took a look but we never got a proper answer.

Can I ask what's the behaviour with the Client Access driver?

@RoyC-Retail-Assist
Copy link
Author

Leaving aside the edge cases where a program abnormally terminates, If the inner transaction is rolled back then an exception is sometimes raised from the iAccess ADO.Net and it leaves the transaction active on the iSeries. It is very time sensitive and I think it is to do with a COM component being destroyed but whatever it is it isn't safe enough for production code.

It's interesting that DB2Connect also has issues as it is something that we have been considering.

@nsarris
Copy link
Contributor

nsarris commented Oct 29, 2018

The iSeries only supports XA transations which MSDTC supports(its a transaction coordination service embedded in windows since 2000, and yes it's a COM component). XA transactions have to be enabled on the MSDTC service for it to work.

I haven't tested client access enough, but I suspect that when a second transation is added it escalates to a distributed XA transation (sql server for example doesn't escalate if the connections taking part are on the same server). With the DB2Connect driver we found out that it escalates even with a single connection. We didn't notice the problem you mentioned with rollbacks, but we did notice the problem with lingering transactions with abnormal program termination. There is a LocalTransaction property on the DB2Connection class but we didn't test it further.

The IBM engineer on site also told us other have been having similar unresolved issues with XA transations. We do need this functionality as well, so I'll try to pressure IBM more on this sometime in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants