-
Notifications
You must be signed in to change notification settings - Fork 38.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Hibernate StatelessSession [SPR-2495] #7184
Comments
Juergen Hoeller commented I'll add documentation on how to use Hibernate's StatelessSession API to Spring's documentation: using the StatelessSession API via the native Hibernate SessionFactory, but integrating with Spring's transaction management. Further potential for explicit support to be explored for Spring 3.0. Juergen |
Josh Moore commented +1 Am currently running into this in 2.5.x with JTA issues: [CODE] and unfortunately StatelessSession shares no common interface with Session for dealing with deferred closes (as noted elsewhere). For anyone who may update this ticket, the following forum entries are all looking for the same thing:
and |
Morten Andersen-Gott commented Can't find the documentation that was supposed to be added according to Juergen's comments. Might be me that's unable to locate it though. Would be nice to have a way of managing the StatelessSession in the same way as the Session (closing session automatically etc). |
Andrew Goode commented See #10870 for proposed patch introducing callback template for StatelessSessions. Perhaps the community could help refine the implementation to make it more robust. |
Willem Dekker commented For my current project we needed to use the Since there are many requests on the web for this kind of behavior I would like to give our solution to the community in the hope you could benefit from it. The [code|#StatelessSessionFactoryBean.java] is attached to this issue and is tested using <bean class="com.acme.spring.data.support.hibernate.StatelessSessionFactoryBean" /> And @AutoWired private StatelessSession statelessSession; (!) Please note that this code will only work with the |
Is this issue still relevant? |
I encountered this issue when integrating the latest Spring 6.2.0 M3 with Jakarta Data RC 1 and Hibernate ORM 6.6.0.Alpha1(Jakarta Data provider, which use StatelessSesison in the background). |
Found the solution here, https://gist.github.com/jelies/5181262 |
WDA opened SPR-2495 and commented
Hello,
since Hibernate 3.1 has a 'StatelessSession' class to use for batch jobs (bulk inserts / updates), it wourld be nice, if a helper class like 'HibernateDaoSupport' could support that new feature.
best regards,
Wolf-Dieter Angerer
Affects: 1.2.8, 2.0 RC3
Attachments:
Issue Links:
19 votes, 20 watchers
The text was updated successfully, but these errors were encountered: