Svetlin Zarev created TOMEE-2057: ------------------------------------ Summary: @BeforeCompletion callback issue Key: TOMEE-2057 URL: https://issues.apache.org/jira/browse/TOMEE-2057 Project: TomEE Issue Type: Bug Reporter: Svetlin Zarev Attachments: sample.zip
I have a @Stateful bean which has @AfterBegin & @BeforeCompletion callbacks defined. It tries to persist a JPA entity in each one of them. Dureing the transaction everithing seems fine, but after the transaction, the EntityManger.find() returns null for the bean persisted during @BeforeCompletion I've attached sample app that reproduces the issue. *Expected result:* The output does not contain any failed tests. *Actual result:* {code} TESTING TX_REQUIRED WITHOUT EXISTING TRANSACTION [TEST FAILED] Expecting entity for BEFORE_COMPLETION instead of: null TESTING TX_REQUIRED WITH EXISTING TRANSACTION [TEST FAILED] Expecting entity for BEFORE_COMPLETION instead of: null {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)