2 Replies Latest reply on Feb 21, 2007 10:12 AM by wolfc

    Question on EntityManager.flush()

      Hi All,

      I have a SFSB-Method "print" (no special transaction-attribute -> REQUIRED) that works as an entry point for printing. Printing is done by Eclipse-BIRT but there is a "prePrintProcess" which put some data in a table "printdata" for BIRT.

      The problem is, that the BIRT-Process is called within the method "print" and so the are no data in "printdata", because the transaction has not been commited, so far.

      So, I tried to encapsulate the "prePrintProcess" in a separate method of the SFSB and set an annotation @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW). Before the method "prePrintProcess" returns, I call "myEntityManger.flush()". But after this method "prePrintProcess" there is still no data in "printdata" :-(.

      What should I do (besides BMT)?

      Thanks for any help!

      Carsten