|
From: Colin S. <col...@ex...> - 2005-05-12 12:12:27
|
Juergen Hoeller wrote: >Hi everybody, > >I've just finished the last bunch of data access refinements I wanted to get >into Spring 1.2 final: > >... > >* I've refined the semantics of the "allowCreate" flag for all of our ORM >templates: This only applies to the creation of non-transactional resources >now. If "allowCreate" is "false", on-the-fly synchronization of a resource >with the current transaction is still allowed. This is in line with the >behavior of TopLink's "getActiveSession" and Hibernate3's >"getCurrentSession", and IMO generally reasonable: eager vs lazy transaction >synchronization should be fully transparent to the user; usually, only the >creation of a non-transactional resource is (potentially) undesirable. > > > I like this. I had generally recommended to people that they set the flag to false, and use HibernateInterceptor, when working with JTATransactionmanager, so that they would catch cases where they acciddentally not wrapping transactionally, and creating non-transacitonal sessions. Now this change allows JTA usage with the flag still set to false, but with no HibernateInterceptor needed any longer, and people can rely on the fact that a lazily created Session will still join the transaction, but there will still be a failure when there is no transaction... |