CMTTransactionFactory and JTATransactionFactory with Hibernate in JBoss EAP 6

Solution Verified - Updated -

Issue

  • When should hibernate.transaction.factory_class be set to org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory?
  • When should hibernate.transaction.factory_class be set to org.hibernate.transaction.JTATransactionFactory?
  • What transaction factory should be used by an application which uses both CMT and BMT (using UserTransaction)?
  • What transaction factory should be used if using Hibernate to start transactions?
    • entityManager.getTransaction().begin()
    • session.beginTransaction()

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 6
  • Hibernate 4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.