DISQUS

DISQUS Hello! Adrian Smith's Blog is using DISQUS, a powerful comment system, to manage its comments. Learn more.

Community Page

Jump to original thread »
Author

Using Managed Sessions in Hibernate to Ease Unit Testing

Started by Adrian Smith · 8 months ago

If you’ve ever tried to reuse a session in Hibernate you may have come across this exception…

org.hibernate.SessionException: Session is closed!
at org.hibernate.impl.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:49)
at org.hibernate.impl ... Continue reading »

2 comments

  • many many thanx for your hint. this is fantastic. no more Session closed! Exceptions. I will never follow the advices from the Hibernate Tutorial. With Adrian's hint you get maximum control over your transactions.
    Thanx a lot Adrian
  • glad you found it useful Thomas

Add New Comment

Returning? Login