I'm experiencing a problem with transactions inside a statefful session Bean scoped in a conversation. I'm using Spring JPA for the Backend; the spring service(behind a pring DAO) is injected inside mu session bean with seam @In annotation.
My problem is the following:
I have one method which starts the convesation annotated as follows:
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) @Begin(join=true,flushMode=FlushModeType.AUTO) public void adjustClient()
This method will create a new temporary Adjustment Entity which is auto generated (sequence Key in Oracle Databse) this adjustment object should only be saved to the database only when the user hits a save button that ends the conversation:
@End @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) public void save()
What happens know is that the adjustClient() method is committing to the database even it has this annotation: @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)