[FB-Tracker] Created: (DNET-764) Supports lack of ambient transaction when auto-enlisting is activated

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[FB-Tracker] Created: (DNET-764) Supports lack of ambient transaction when auto-enlisting is activated

JIRA tracker@firebirdsql.org
Supports lack of ambient transaction when auto-enlisting is activated
---------------------------------------------------------------------

                 Key: DNET-764
                 URL: http://tracker.firebirdsql.org/browse/DNET-764
             Project: .NET Data provider
          Issue Type: New Feature
          Components: ADO.NET Provider
    Affects Versions: 5.9.1.0
            Reporter: Frédéric Delaporte
            Assignee: Jiri Cincura


When auto-enlistment is enabled, opening a Firebird connection without an ongoing ambient system transaction fails with error:
System.InvalidOperationException : There is no active TransactionScope to enlist transactions.

Quite self explanatory. But this behavior is exclusive to Firebird and quite unexpected for users of other database connections, and also unexpected according to MSDN about auto-enlistment:

> A connection object will automatically enlist in an existing distributed transaction if it determines that a transaction is active, which, in System.Transaction terms, means that Transaction.Current is not null. Automatic transaction enlistment occurs when the connection is opened. It will not happen after that even if a command is executed inside of a transaction scope.

https://msdn.microsoft.com/en-us/library/ms254973(v=vs.110).aspx#Anchor_1

Usually, enabling auto-enlistment does not mandate an active transaction for opening connection. The connection simply does not enlist to anything when opened if there are no active transaction at that time. (Thankfully, since most other db connections have auto-enlistment enabled by default.)

For reference, here is the list of other connections which I have tested and support opening with auto-enlistment enabled and lack of ambient transaction: SqlConnection, SQLiteConnection, SqlCeConnection, OdbcConnection, OracleConnection (managed & unmanaged), NpgsqlConnection, MySqlConnection.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Firebird-net-provider mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Loading...