pb00067: I´ve checked what you´d suggested and these "flags" are both false, so if this code were executed we would have flush set do true. But I think this code isn´t being executed because I´m using Spring to manage JBossJTA transactions. Logging shows me:
11:45:31,371 TRACE [org.springframework.transaction.interceptor.TransactionInterceptor] (http--127.0.0.1-8080-1) Completing transaction for...
11:45:31,373 TRACE [org.springframework.transaction.jta.JtaTransactionManager] (http--127.0.0.1-8080-1) Triggering beforeCommit synchronization
11:45:31,374 TRACE [org.springframework.transaction.jta.JtaTransactionManager] (http--127.0.0.1-8080-1) Triggering beforeCompletion synchronization
11:45:31,375 DEBUG [org.springframework.orm.jpa.EntityManagerFactoryUtils] (http--127.0.0.1-8080-1) Closing JPA EntityManager
11:45:31,376 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] (http--127.0.0.1-8080-1) Initiating transaction commit
11:45:31,377 TRACE [org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization] (http--127.0.0.1-8080-1) JTA sync : beforeCompletion()
11:45:31,378 TRACE [org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl] (http--127.0.0.1-8080-1) Transaction before completion callback
11:45:31,379 TRACE [org.hibernate.internal.SessionImpl] (http--127.0.0.1-8080-1) before transaction completion
11:45:31,380 TRACE [org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization] (http--127.0.0.1-8080-1) JTA sync : afterCompletion(3)
11:45:31,381 TRACE [org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl] (http--127.0.0.1-8080-1) Transaction after completion callback [status=3]
11:45:31,382 TRACE [org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl] (http--127.0.0.1-8080-1) after transaction completion
11:45:31,382 DEBUG [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (http--127.0.0.1-8080-1) Aggressively releasing JDBC connection
11:45:31,383 TRACE [org.hibernate.internal.SessionImpl] (http--127.0.0.1-8080-1) after transaction completion
11:45:31,383 DEBUG [org.hibernate.ejb.EntityManagerImpl] (http--127.0.0.1-8080-1) Closing entity manager after transaction completion
11:45:31,384 TRACE [org.hibernate.internal.SessionImpl] (http--127.0.0.1-8080-1) Closing session
11:45:31,384 TRACE [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (http--127.0.0.1-8080-1) Closing logical connection
11:45:31,385 TRACE [org.hibernate.engine.jdbc.internal.proxy.ConnectionProxyHandler] (http--127.0.0.1-8080-1) Handling invocation of connection method [close]
11:45:31,385 TRACE [org.hibernate.engine.jdbc.internal.proxy.ConnectionProxyHandler] (http--127.0.0.1-8080-1) Invalidating connection handle
11:45:31,386 TRACE [org.hibernate.engine.jdbc.internal.JdbcResourceRegistryImpl] (http--127.0.0.1-8080-1) Closing JDBC container [org.hibernate.engine.jdbc.internal.JdbcResourceRegistryImpl@146d34f]
11:45:31,387 TRACE [org.hibernate.engine.jdbc.internal.LogicalConnectionImpl] (http--127.0.0.1-8080-1) Logical connection closed
11:45:31,387 TRACE [org.springframework.transaction.jta.JtaTransactionManager] (http--127.0.0.1-8080-1) Triggering afterCommit synchronization
11:45:31,388 TRACE [org.springframework.transaction.jta.JtaTransactionManager] (http--127.0.0.1-8080-1) Triggering afterCompletion synchronization
I´ve posted a thread about it in the Spring forum too (
http://forum.springsource.org/showthrea ... post412589).
It seems to be something about how Spring calls transaction synchronization when using JTA, but we don´t know it for sure.
Any other suggestions?
Thanks for answering.