Hello All,
I am currently using 3.2 with annotations and entity manager.
I am interested in using entity lifecycle callbacks using annotations such as @PostPersist and @PostUpdate.
I realize that in order to maintain portability, invoking an entity manager or invoking entity manager queries are not allowed. However, making calls to other beans or running JDBC queries are allowed.
I am making a JDBC call based on a post update trigger and the query is working although it is not picking up the database changes that are occurring as part of the entity manager flush. Once the flush has completed and before the JTA transaction commit, the JDBC query works as expected, pulling in the updated entities. I am using an injected JDBC datasource which should join with the open transaction.
Is this expected behavior or is there a way to get this to work?
Thanks alot!
Kurt
|