You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SendResponse does its main job in the "closing phase" of the two-phase commit protocol.
That could be either a commit or abort.
It's good to do it there (and to allow it to happen even if a previous participant aborted it) because that's when you have enough information to create your response.
I don't know what you're doing in your TriggerMerchantBlockCacheReload.
If it's not related to the transaction, maybe you can choose to
do the work also during commit/abort (instead of prepare)
do the work asynchronously, for example by preparing some work payload and sending it to a queue from where a "TriggerMerchantBlockWhatever" QBean will be reading in its own thread and doing the work in a concurrent thread, after the transaction has happened.
https://github.com/jpos/jPOS-EE/blob/master/modules/qrest/src/main/java/org/jpos/qrest/SendResponse.java#L49-L50
I have a participant that takes a lot of time. LongRunningParticpant
This
LongRunningParticpant
is placed after the SendResponse participant in the txn mgr.But since the response is only sent in the commit method
https://github.com/jpos/jPOS-EE/blob/master/modules/qrest/src/main/java/org/jpos/qrest/SendResponse.java#L54-L60
It gets sent after the '
LongRunningParticpant'
completes.Snippet of profiler
So the question is why does the prepare not do anything in the SendResponse participant?
The text was updated successfully, but these errors were encountered: