I am looking to use the timer functionality of an embeded subprocess. The timer functionality works well and I can see that the rest of the process after the timer is called. However it seems that the transaction demarcation is not working as I was expecting.
Once the timer has fired I call an handler that is responsible to update an object in a database.
The handler calls an EJB who updates the object.
The call is properly made and I can see that the EJB joins the existing JTA transaction. However when the call returns from the handler the transaction is not committed and my update to the DB is eventually rolledback after a timeout.
I use two xa datasources, one for my DB the other for JBPM.
I have tested a similar scenario without the timer ie as a next step from the previous hop and the transaction is properly committed so I believe this to be an issue specific to timers.
I there something that needs to be done JTA wise when the handler is called as the result of a timer ?
I have a small project that demonstrate the behavior if anyone is interested.