-
1. Re: ReaperMonitor usage
tomjenkinson May 5, 2015 3:50 AM (in response to hernanbolido)Hi Hernan,
Thanks for your interest in Narayana
Hope this helps: https://github.com/jbosstm/narayana/blob/master/ArjunaCore/arjuna/tests/classes/com/hp/mwtests/ts/arjuna/reaper/ReaperMonitorTest.java
Thanks,
Tom
-
2. Re: ReaperMonitor usage
hernanbolido May 5, 2015 9:32 AM (in response to tomjenkinson)Hi Tom! Thank you very much!
I'm wondering if this mechanism can be used for wildfly's subsystem too, or it's only for standalone instantiation.
Regards. Hernán.
-
3. Re: ReaperMonitor usage
tomjenkinson May 6, 2015 4:38 AM (in response to hernanbolido)Hi Hernan,
You should be OK to use it in WFLY but I haven't tried myself:
import com.arjuna.ats.arjuna.coordinator.TransactionReaper;
import com.arjuna.ats.arjuna.coordinator.listener.ReaperMonitor;
TransactionReaper reaper = TransactionReaper.transactionReaper();
reaper.addListener(new ReaperMonitor() {...});
Don't include the Narayana jar in your .war/ear, instead you need something like this in your manifest:
Dependencies: org.jboss.jts
Please note that the ReaperMonitor is called after the transaction is rolled back/set rollback only. It may have an impact on the implementation of your listener.
Hope it helps,
Tom
-
4. Re: ReaperMonitor usage
hernanbolido May 6, 2015 11:43 AM (in response to tomjenkinson)Thank you very much!
Regards. Hernán.
-
5. Re: ReaperMonitor usage
tomjenkinson May 6, 2015 4:24 PM (in response to hernanbolido)You are very welcome! If you have issues with it, please let us know and one of us will try to help you further.