Norman, if you are using oracle, why are you using microsoft crippled implementation? I recommend you try the latest ODP.NET from oracle for better compatibility.
Cubas, I thought distributed transactions (transactionscope) didn't need an explicit NHibernate/ADO transaction created, this should be handled by the DTC and the resource manager, in this case OraMTS. I'm not sure what is the behavior with other DBs, but an implicit transaction is created in Oracle. On May 17, 7:19 am, Norman <[email protected]> wrote: > I’ve finally had chance to attempt to fix my original issue (see link) > with the solution described by Diego to use both TransactionScope and > BeginTransaction(). > > Unfortunately, with Oracle the following two test cases fail with > Oracle exceptions as shown. (Both pass with SQL Server.) > > Any comments would be appreciated. > > Thanks. > > Link to original > problem:http://groups.google.com/group/nhusers/browse_thread/thread/160bad222... > > ------------------------ > > [Test] > public void > CanBeginTransactionWithinTransactionScopeWhenSessionIsCreatedBeforeTransactionScope() > { > using (ISession s = OpenSession()) > { > using (TransactionScope scope = new > TransactionScope()) > { > using (ITransaction tx = s.BeginTransaction()) // > => Exception here > { > tx.Commit(); > } > > scope.Complete(); > } > } > } > > ***** > NHibernate.Test.NHSpecificTest.NH2176.Fixture.CanBeginTransactionWithinTransactionScopeWhenSessionIsCreatedBeforeTransactionScope > 12:06:03,742 ERROR AdoTransaction:144 - Begin transaction failed > System.InvalidOperationException: OracleConnection does not support > parallel transactions. > at > System.Data.OracleClient.OracleInternalConnection.BeginOracleTransaction(IsolationLevel > il) > at > System.Data.OracleClient.OracleInternalConnection.BeginTransaction(IsolationLevel > il) > at > System.Data.OracleClient.OracleConnection.BeginDbTransaction(IsolationLevel > isolationLevel) > at > System.Data.Common.DbConnection.System.Data.IDbConnection.BeginTransaction(IsolationLevel > isolationLevel) > at NHibernate.Transaction.AdoTransaction.Begin(IsolationLevel > isolationLevel) in \NHibernate-2.1.2.GA-src\src\NHibernate\Transaction > \AdoTransaction.cs:line 134 > > [Test] > public void > CanBeginTransactionWithinTransactionScopeWhenSessionIsCreatedAfterTransactionScope() > { > using (TransactionScope scope = new TransactionScope()) > { > using (ISession s = OpenSession()) > { > using (ITransaction tx = s.BeginTransaction()) // > => Exception here > { > tx.Commit(); > } > } > > scope.Complete(); > } > } > > ***** > NHibernate.Test.NHSpecificTest.NH2176.Fixture.CanBeginTransactionWithinTransactionScopeWhenSessionIsCreatedAfterTransactionScope > 12:05:31,820 ERROR AdoTransaction:144 - Begin transaction failed > System.InvalidOperationException: OracleConnection does not support > parallel transactions. > at > System.Data.OracleClient.OracleInternalConnection.BeginOracleTransaction(IsolationLevel > il) > at > System.Data.OracleClient.OracleInternalConnection.BeginTransaction(IsolationLevel > il) > at > System.Data.OracleClient.OracleConnection.BeginDbTransaction(IsolationLevel > isolationLevel) > at > System.Data.Common.DbConnection.System.Data.IDbConnection.BeginTransaction(IsolationLevel > isolationLevel) > at NHibernate.Transaction.AdoTransaction.Begin(IsolationLevel > isolationLevel) in \NHibernate-2.1.2.GA-src\src\NHibernate\Transaction > \AdoTransaction.cs:line 134 > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group > athttp://groups.google.com/group/nhusers?hl=en. -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
