Hi, No problems!
https://github.com/haf/Castle.Services.Transaction/tree/develop/src/Castle.Facilities.AutoTx/Lifestyles https://github.com/haf/Castle.Facilities.NHibernate/blob/master/src/Castle.Facilities.NHibernate/NHibernateFacility.cs I see -- in that case, perhaps a 'nice' solution would be an ISession component with Per-Transaction lifestyle and a custom IComponentActivator? I haven't hacked Windsor too much, but the new NHibernateFacility revolves around IoC rather than registering resources. Perhaps someone could advice if an IComponentActivator implementation is the correct way to go if FlushMode were to be set when a readonly transaction is resolved? Probably the per-transaction lifestyle would have to move all of its CustomContext keys to the creation context's keys: public interface IComponentActivator { object Create(CreationContext context); void Destroy(object instance); } hmm.. Cheers Henrik On Apr 19, 5:57 pm, Jordan <[email protected]> wrote: > Hello Henrik, > > Many thanks for looking at this. I've replied inline to your comments: > > > I have added a property called 'CustomContext : > > IEnumerable<KeyValuePair<string,object>>', > > Ah cool - sounds good. > > > As far as I understand, your patch only > > introduced this property but didn't add the infrastructure required > > for NHibernate to make use of it? Is that correct? > > No - I also provided the necessary patch for NHibernate to make use of > it. Basically, the ResourceAdapter > sets the FlushMode to FlushMode.Never for the course of the > transaction, and then back to its previous setting once > the transaction had been > committed.https://github.com/gusgorman/Castle.Facilities.NHibernateIntegration > > > In that case, perhaps you would be interested in adding those features > > to the current develop branch of C.S.Transaction and also create a > > wiki page on the new NHibernateFacility... > > Yes - I'm quite busy at the moment but will definitely try to find the > time. > > > PS: Isn't the new per-transaction lifestyle better for fixing this > > NHibernate problem of read-after-faulted-write? > > Um - not sure, can you point me at the docs for the new per- > transaction lifestyle, I'm not familiar with it. > > 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.
