It's just what we want. We want to use the same transaction from the NH calls so when SP calls is executed it will not be locked by the transaction open by NH
How can we get the connection by ActiveRecord. Something like this: ActiveRecordMediator.GetSessionFactoryHolder().GetSessionFactory(typeof(ActiveRecordBase)).GetCurrentSession().Connection On Aug 5, 10:33 am, Gauthier Segay <[email protected]> wrote: > Hello Chitech > > if you want to use the same connection, you can use > ISession.Connection, your statement should be executed in the same > transaction as the session is operating in. > > I'm not sure how it's behaving with the underlying ADO.NET provider > you are using, but I remember calling oracle SP (the deprecated ms > provider one) using that handle to IDbConnection > > Let us know what you find out or I misunderstood the problem. > > On Aug 4, 2:46 pm, chitech <[email protected]> wrote: > > > > > Alo > > > We have alot of SP and now we want to only using NHibernate/ > > Activerecord. > > The SessionScope which create a implicit NHibernate Transaction > > typically looks like this: > > > NHibernate call1 -> NHibernate call2 -> SP call1 > > > The database isolation level is set to Read Committed. And SP is > > executed with its own connection (total separated from NHibernate) > > If NHibernate call1 use table A and SP call1 also use table A we will > > have a problem because table A is locked by NHibernate transaction. > > I think one way to solve this is to commit the transaction before SP > > call1 by using TransactionScope. This change have to done all places > > with this combination > > I am looking for at more generic solution. How about using the > > IDBConnection from NHibernate session to execute the SP call1. Will > > this solve the problem? > > > Thx in advance -- You received this message because you are subscribed to the Google Groups "Castle Project Users" 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/castle-project-users?hl=en.
