I have two objects Antrag (application) and Anlage (facility). An application can be made for multiple facilities. The application is persisted directly in the DAO. The faci
Your expectation is correct: everything should be made in a single transaction, and the insertion of Antrag
should be rolled back as well.
I think your persistence-unit is simply not JTA: test in the persistence.xml
file that you have something like:
<persistence-unit name="ejb-model" transaction-type="JTA">
<jta-data-source>java:/someNameDB</jta-data-source>