[jboss-user] [EJB 3.0] - Question on EntityManager.flush()
do-not-reply at jboss.com
Wed Feb 21 09:42:59 EST 2007
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!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4019960#4019960
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4019960
More information about the jboss-user