While debugging a Spring/Hibernate-based web application I found this in the logs.Pre-bound JDBC Connection found! HibernateTransactionManager does not support running within DataSourceTransactionManager if told to manage the DataSource itself. It is recommended to use a single HibernateTransactionManager for all transactions on a single DataSource, no matter whether Hibernate or JDBC access.
Sounds as something fundamentally wrong with my configuration was detected. Since I hadn’t changed anything I asked Google. It lead me to https://jira.springsource.org/browse/SPR-9496 and from there to a referenced blog post. I knew that the information presented there didn’t apply in my case.
So, what caused this error in my case? I still don’t know for sure but I’m very positive that it’s a JRebel side effect. It appears that for once JRebel got confused transparently reloading Spring beans and somehow there were more than one transaction manager in the JVM.