Hibernate4 version of SpringSessionContext.currentSession() does not create a session if TransactionSynchronizationManager does not contain one [SPR-11801] #16421
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
in: data
Issues in data modules (jdbc, orm, oxm, tx)
status: duplicate
A duplicate of another issue
spring-projects-issues commentedMay 16, 2014
•
edited
thiago andrade opened SPR-11801 and commented
Please, read this before delete the JIRA issue for being duplicated!!
There is as other JIRA issue that relates this problem BUT it relates it as an "improvement" and its clear that this cannot be considered as an ordinary improvement, I consider it as a serious bug. By the way there is A LOT of resources around the web of people searching for the solution of this (like this http://stackoverflow.com/questions/20500346/error-no-session-bound-to-current-thread-with-hibernate-4-and-spring-3). They are using this workaround (https://gist.github.com/nexdrew/6992329). The problem is that, as
@Fabricio
Carvalho said, ??The side effect caused by this approach is the overhead of creating and using a HibernateTransactionManager on simple queries. Not in resource consumption of the database, but in processing of the application server.??.Here is the description of the issue
The related JIRA issue is #13659
Affects: 3.1 GA, 3.2.1, 3.2.2, 3.2.5
Reference URL: http://stackoverflow.com/questions/20500346/error-no-session-bound-to-current-thread-with-hibernate-4-and-spring-3
Issue Links:
The text was updated successfully, but these errors were encountered: