|
[
Permalink
| « Hide
]
Steve Ebersole added a comment - 21/Nov/06 03:10 PM
Do you have a setting for 'hibernate.transaction.factory_class'? If not, Hibernate defaults to using JDBC-based transactions (that has not changed...).
No I didn't.
With hibernate 3.0.5 the autoflush was working without that. [Environment] Hibernate 3.0.5 [TransactionFactoryFactory] Using default transaction strategy (direct JDBC transactions) After setting that property with hibernate 3.2.0 it also flushes the session in beforeCompletion(). hibernate.transaction.factory_class=org.hibernate.transaction.JTATransactionFactory I thought that setting hibernate.current_session_context_class=org.hibernate.context.JTASessionContext was enough to activate JTA behavior, because the javadoc of JTASessionContext says "Note that the sessions returned from this method are automatically configured with both the auto-flush and auto-close attributes set to true." But that assumption was probably wrong. So it's not a bug but a slightly changed behavior in 3.2.0-ga. Ah yes, there was a change to how the transaction synchronization is registered starting with 3.2 for JPA compliance which would cause this. At least it should cause a warning.
|
||||||||||||||||||||||||||||||||||||||||||||||||