Remove custom TransactionManager #57

Closed
hisystems opened this Issue Apr 23, 2012 · 1 comment

Projects

None yet

1 participant

@hisystems
Owner

A custom Transaction Manager was implemented in order to manage handling transaction start, commit and rollback in conjunction with the TransactionScope. To achieve this the OLEDBSERVICES=-3 option is specified (http://msdn.microsoft.com/en-us/library/windows/desktop/ms724518(v=vs.85).aspx) in the connection string which effectively disables managing of transactions so that the TransactionManager could manage the transactions. However, doing so limits the functionality of the TransactionScope construct with regard to distributed transactions. So, using distributed transactions should be re-enabled.

Unfortunately, this change will probably mean that the BEING/COMMIT/ROLLBACK TRANSACTIONs will not be logged via the StatementExecuted event.

@hisystems hisystems was assigned Apr 23, 2012
@hisystems
Owner

Created issue Add support for LocalTransactionScope so that should distributed transactions not be required the LocalTransactionScope construct can instead be utilised which will implement just database transactions. This will therefore also include transaction logging statements.

@hisystems hisystems added a commit that closed this issue May 5, 2012
@hisystems Removed custom TransactionManager. Closes #57.
All transactions now fall through to MSDTC when used with TransactionScope. Use the LocalTransactionScope to use local transactions and bypass MSDTC.

IMPORTANT: This is a breaking change as of release 4.0.0.0. Connections are now NOT implicitly opened when any any Database.ConnectionController.Execute* function is called within a TransactionScope. Instead a ConnectionScope must also be used to call the Execute* statement. Previously, the connection would be implicitly opened if any Database.ConnectionController.Execute* functions was called within a TransactionScope using statement. Normal calls to DatabaseObject.Save or Database.ObjectSave are not affected, so only minor code changes (if any) should be required.
85bc7fb
@hisystems hisystems closed this in 85bc7fb May 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment