Proper handling of the Session / EntityManager after an exception has been thrown in Hibernate

Solution Verified - Updated -

Issue

  • What do I do with the EntityManager after an exception has been thrown?
  • In a Seam long running conversation how to I get a new EntityManager and discard the old one?

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 4
    • 5
    • 6
    • 7
  • Hibernate
    • 3
    • 4
    • 5
  • Seam 2.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content