1

Which way to obtain a persistence session is recommended for web applications:

  1. sessionFactory.openSession() or
  2. sessionFactory.currentSession()

in Hibernate with Spring? And: Why?

MWiesner
  • 8,868
  • 11
  • 36
  • 70
  • Welcome to Stack Overflow! Please edit your question to post the [minimal code that reproduces the problem that you're asking about](http://stackoverflow.com/help/mcve). That will give us a better chance of being able to help without asking for clarification – koceeng Jan 05 '17 at 06:03
  • 1
    Possible duplicate of [Hibernate openSession() vs getCurrentSession()](http://stackoverflow.com/questions/8046662/hibernate-opensession-vs-getcurrentsession) – Mihir Jan 05 '17 at 06:21

0 Answers0