This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why does Spring transactional method result in LazyInitializationException?

 
Nathan King
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The method below results in the org.hibernate.LazyInitializationException being thrown and I'd appreciate help in understanding why. I'm using JPA 2/Hibernate & Spring.

JPA 2/Hibernate are using the default transaction persistence context, therefore, shouldn't the method below allow for lazy loading?

Note: daoWrapper is a convenience class that wraps entity manager methods; the class itself is also annotated with @Transactional.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic