Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0, 3.1, 3.1.1, 3.1.2
-
None
Description
The DeployerEjb started a transaction as a side effect of it being an EJB. This led to oddities as the entire deploy process for that archive would execute in transaction. At deployment JPA PersistenceProviders will initialize and @Singleton beans may start. These should not be running in a transaction unless they themselves wish to start one.
One particular reported issue involves Hibernate not being able to execute it's DDL updating logic (hibernate.hbm2ddl.auto) when the app is deployed. The resulting exception in this case is a deploy time exception like the following:
java.sql.SQLException: Auto-commit can not be set while enrolled in a transaction
Note, putting the application in the apps/ directory manually and restarting the server is one way to work around this issue in existing releases of OpenEJB.