From: MartinT <mar...@ya...> - 2009-09-22 04:59:16
|
im trying to utilise the transactionscope in .net with the latest driver v2.5.1. when i use a TransactionScope object and execute operations within the same FbConnection, it works OK. however when i execute operations on separate FbConnections (with the same connection strings) then i am receiving the following exception: System.ArgumentException was unhandled Message="Unable to enlist in transaction, a local transaction already exists" Source="FirebirdSql.Data.FirebirdClient" StackTrace: at FirebirdSql.Data.FirebirdClient.FbConnectionInternal.EnlistTransaction(Transaction transaction) at FirebirdSql.Data.FirebirdClient.FbConnection.Open() at ... bla bla bla ... help much appreciated as the usage of TransactionScope will save us heaps of work rewriting data access layer code. thanks. -- View this message in context: http://www.nabble.com/TransactionScope-%22Unable-to-enlist-in-transaction%2C-a-local-transaction-already-exists%22-tp25530564p25530564.html Sent from the firebird-net-provider mailing list archive at Nabble.com. |
From: Jiri C. <di...@ci...> - 2009-09-22 09:32:39
|
You can use TransactionScope only on one connection. When starting another one, even with same connection string, the internals has no idea that the connection string will be same. And the DTC isn't supported (yet). -- Jiri {x2} Cincura (CTO x2develop.com) http://blog.cincura.net/ | http://www.ID3renamer.com |
From: MartinT <mar...@ya...> - 2009-09-23 07:21:19
|
Hi, sorry for double posting but I am under bit of pressure. Is the TransactionScope not fully supported by Firebird, or am I doign something wrong in my method calls to generate this problem, thanks MartinT wrote: > > im trying to utilise the transactionscope in .net with the latest driver > v2.5.1. when i use a TransactionScope object and execute operations within > the same FbConnection, it works OK. however when i execute operations on > separate FbConnections (with the same connection strings) then i am > receiving the following exception: > > System.ArgumentException was unhandled > Message="Unable to enlist in transaction, a local transaction already > exists" > Source="FirebirdSql.Data.FirebirdClient" > StackTrace: > at > FirebirdSql.Data.FirebirdClient.FbConnectionInternal.EnlistTransaction(Transaction > transaction) > at FirebirdSql.Data.FirebirdClient.FbConnection.Open() > at ... bla bla bla ... > > help much appreciated as the usage of TransactionScope will save us heaps > of work rewriting data access layer code. thanks. > -- View this message in context: http://www.nabble.com/TransactionScope-%22Unable-to-enlist-in-transaction%2C-a-local-transaction-already-exists%22-tp25530564p25531008.html Sent from the firebird-net-provider mailing list archive at Nabble.com. |
From: Jiri C. <di...@ci...> - 2009-09-23 07:27:13
|
On Wed, Sep 23, 2009 at 09:21, MartinT <mar...@ya...> wrote: > Hi, sorry for double posting but I am under bit of pressure. Is the > TransactionScope not fully supported by Firebird, or am I doign something > wrong in my method calls to generate this problem, thanks TS is supported, but not the DTC. So you have to use only one connection (or contribute with DTC support ;)). -- Jiri {x2} Cincura (CTO x2develop.com) http://blog.cincura.net/ | http://www.ID3renamer.com |
From: MartinT <mar...@ya...> - 2009-09-24 06:51:00
|
>From what I can gather Firebird doesn;t support a 2 phase commit so this kind of scenario with a TransactionScope over 2 separate connections won't work with FirebirdDotNetProvider because it is promoted to a DTC. woudl be great if somebody more knowledgeable could verify this for me, thanks MartinT wrote: > > Hi, sorry for double posting but I am under bit of pressure. Is the > TransactionScope not fully supported by Firebird, or am I doign something > wrong in my method calls to generate this problem, thanks > > > MartinT wrote: >> >> im trying to utilise the transactionscope in .net with the latest driver >> v2.5.1. when i use a TransactionScope object and execute operations >> within the same FbConnection, it works OK. however when i execute >> operations on separate FbConnections (with the same connection strings) >> then i am receiving the following exception: >> >> System.ArgumentException was unhandled >> Message="Unable to enlist in transaction, a local transaction already >> exists" >> Source="FirebirdSql.Data.FirebirdClient" >> StackTrace: >> at >> FirebirdSql.Data.FirebirdClient.FbConnectionInternal.EnlistTransaction(Transaction >> transaction) >> at FirebirdSql.Data.FirebirdClient.FbConnection.Open() >> at ... bla bla bla ... >> >> help much appreciated as the usage of TransactionScope will save us heaps >> of work rewriting data access layer code. thanks. >> > > -- View this message in context: http://www.nabble.com/TransactionScope-%22Unable-to-enlist-in-transaction%2C-a-local-transaction-already-exists%22-tp25530564p25534520.html Sent from the firebird-net-provider mailing list archive at Nabble.com. |
From: Jiri C. <di...@ci...> - 2009-09-24 07:13:37
|
On Thu, Sep 24, 2009 at 08:50, MartinT <mar...@ya...> wrote: > >From what I can gather Firebird doesn;t support a 2 phase commit so this kind > of scenario with a TransactionScope over 2 separate connections won't work > with FirebirdDotNetProvider because it is promoted to a DTC. Firebird supports 2PC, but TS is using DTC service locally. -- Jiri {x2} Cincura (CTO x2develop.com) http://blog.cincura.net/ | http://www.ID3renamer.com |
From: MartinT <mar...@ya...> - 2009-09-25 02:08:41
|
Jiri Thanks for replying it's good to get confirmation from an expert. I think I'm gonna do some kind of workaround in my data access layer so that it keeps the connection alive somehow if it's wrapped inside a TS. Regarding contributing to the DTC code, if it had been 10 years ago then I wouldve been right up for this!! You guys are doing a fantastic job!!! UNFORTUNATELY these days by the time I get home from work, put the kids to bed, seen to the missus and had a glass of wine I usually pass out at this point. :-) Jiri Cincura wrote: > > You can use TransactionScope only on one connection. When starting > another one, even with same connection string, the internals has no > idea that the connection string will be same. And the DTC isn't > supported (yet). > > -- > Jiri {x2} Cincura (CTO x2develop.com) > http://blog.cincura.net/ | http://www.ID3renamer.com > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register > now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Firebird-net-provider mailing list > Fir...@li... > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider > > -- View this message in context: http://www.nabble.com/TransactionScope-%22Unable-to-enlist-in-transaction%2C-a-local-transaction-already-exists%22-tp25530564p25605176.html Sent from the firebird-net-provider mailing list archive at Nabble.com. |
From: Jiri C. <di...@ci...> - 2009-10-11 12:27:42
|
Interestingly, after notice from Vladimir Bodecek [1], this should be working. Are you sure you didn't started some transaction with BeginTransaction and you're using only TS? [1] He also found, that you don't need DTC opening two separate connections. Probably something changed since I last time looked to DTC. :o -- Jiri {x2} Cincura (CTO x2develop.com) http://blog.cincura.net/ | http://www.ID3renamer.com |
From: Jiri C. <di...@ci...> - 2009-10-11 12:25:41
|
On Sun, Oct 11, 2009 at 14:21, Jiri Cincura <di...@ci...> wrote: > Probably something changed since I last time looked to > DTC. :o Does anybody knows about some changes in .NET 3.5(SP1) from .NET 2? -- Jiri {x2} Cincura (CTO x2develop.com) http://blog.cincura.net/ | http://www.ID3renamer.com |