tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From freeway <>
Subject Re: Transaction Problems with OpenEJB-Hibernate on Tomcat
Date Tue, 16 Feb 2010 04:44:47 GMT

For the record, I resolved this transaction commit-rollback problem using
OpenEJB and Hibernate together, without the need for a custom JTA
transaction factory class (although I wrote one that seemed to work).  All
the EJBs in this application are stateless session beans using
container-managed transactions, so the off-the-shelf Hibernate class
org.hibernate.transaction.CMTTransactionFactory worked fine.

The data source connections are configured in openejb.xml, and the Tomcat
webapp in which the EJBs are deployed has a
WEB-INF/classes/META-INF/persistence.xml file like the following that
references the Hibernate configuration file, where all other
persistence-related settings are stored.

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0"
  <persistence-unit name="mydb" transaction-type="JTA">
      <property name="hibernate.ejb.cfgfile" value="hibernate.cfg.xml"/>

Also, some of my entries in the ejb-jar.xml file were wrong or missing,
which was contributing to the problem.

At any rate, if anyone else on this forum is having problems deploying
OpenEJB with Hibernate on Tomcat, please reply and I will pass along any
help that I can.


View this message in context:
Sent from the OpenEJB User mailing list archive at

View raw message