Hi Henry, Thanks for taking the time to look at this.
> First, why open the tx2 instead the oly create a read only session? At the moment I'm working on web apps - therefore a NHibernate session is opened for each http request by the castle NHibernate facility. It wouldn't seem right to me to open a second session for every readonly operation. > But when it comes to the transaction itself, things gets more > complicated. On your patch, even on a readonly transaction the commit > and rollback steps are still been executed. Yes, they need to be. How else would you end the transaction? > - What happens if another resources were enlisted? For example, how > should a file system tx should behave in a read only scenario? > - How the TransactionScope and a ReadOnly transaction would interact? To be honest I'm not sure how a file system tx should behave in a read only scenario :) But then I've never done any work with file system transactions. We probably are dealing with an ORM specific problem here . As someone else elegantly pointed out, this is basically a work around until we have transactional memory. > imo would be a lot more simpler to only provide a way to signal the > nhibernate facility to not enlist and flush the session. What do you > think? I would welcome a better solution if it could be found. Don't you need the session to start the transaction though? regards, Jordan. -- You received this message because you are subscribed to the Google Groups "Castle Project Development List" 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-devel?hl=en.
