-
1. Re: Callback Transaction Commit-CMP
stefanotravelli Jan 31, 2009 6:00 PM (in response to tarunbansal84)I would try registering a component implementing javax.transaction.Synchronization with org.jboss.seam.transaction.Transaction.instance().registerSynchronization()
You have to figure out the life cycle of this component. Maybe an event scoped component that register itself at @Create time.
You also need <transaction:ejb-transaction/> in components.xml for the callback method to be invoked.
-
2. Re: Callback Transaction Commit-CMP
agori Jan 31, 2009 9:04 PM (in response to tarunbansal84)You could observe the
org.jboss.seam.afterTransactionSuccess
Seam event.
Take a look at Seam documentatin about its event system:http://docs.jboss.org/seam/latest/reference/en-US/html/events.html
-
3. Re: Callback Transaction Commit-CMP
stefanotravelli Jan 31, 2009 11:17 PM (in response to tarunbansal84)Good point.
However, note that such event get raised only by the Seam Application Framework, that is the EntityHome or HibernateEntityHome classes.
-
4. Re: Callback Transaction Commit-CMP
tarunbansal84 Feb 5, 2009 3:58 AM (in response to tarunbansal84)Hi Guys
Thanks for the response. This solution worked for me.
I just added action for seam event in component.xml.