]
Juraci Paixao Krohling reassigned EJB-393:
------------------------------------------
Assignee: Juraci Paixao Krohling
Replace EntityManagerFactory#createEntityManager by
getEntityManager() in Test Cases
------------------------------------------------------------------------------------
Key: EJB-393
URL:
http://opensource.atlassian.com/projects/hibernate/browse/EJB-393
Project: Hibernate Entity Manager
Issue Type: Patch
Components: EntityManager
Reporter: Juraci Paixao Krohling
Assignee: Juraci Paixao Krohling
Attachments: ChangedEntityManagerSource.diff
The test cases are using EntityManagerFactory#createEntityManager to get an EntityManager
instance and are not properly handling the exceptions. Thus, the parent test case
org.hibernate.ejb.test.TestCase needs to override the runTest method to catch the
exceptions and rollback the non-finished transactions and close the entity manager. Also,
the main test case should provide a getter method to the entity manager.
Additionally, the existing test cases should not use createEntityManager anymore, which
should be replaced by the entity manager getter defined in the super class.
The following patch implements these changes.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: