1

I have spring boot 2.0.2.RELEASE application. Which uses Spring Data JPA Repositories to fetch Data from underlying db.

All I want to configure is that when I use any repository function to fetch data from database it used use stateless session to communicate with DB and fetching data.

I have googled tons of article and other resources but not found any way how to configure and do this.

Kindly guide me to any documentation or any blog or tell me how to configure to achieve the above requirements.

Nitish Kumar
  • 721
  • 1
  • 10
  • 26
  • Can you please explain why you want to use stateless session? – Simon Martinelli Jun 21 '18 at 10:42
  • JPA doesn't have a stateless session. So that won't be possible. – M. Deinum Jun 21 '18 at 10:47
  • It may answer the question: https://stackoverflow.com/questions/27101707/is-there-a-stateless-version-of-the-jpa-entitymanager – pdem Jun 21 '18 at 10:53
  • I am using JPA + Hibernate in a Batch Processing application. I am processing millions of entities. And for a business strategy I want new instance of Entity for the same Entity each time I make a Database call. @SimonMartinelli – Nitish Kumar Jun 21 '18 at 11:48

0 Answers0