Skip to content

QRest SendResponse participant does not send response in the prepare method #300

@mchhil-incomm

Description

@mchhil-incomm

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

    <profiler>
     prepare: o.j.q.p.Router [0.6/0.6]
     prepare: c.o.a.PrepareContext [1.7/2.4]
     prepare: c.o.a.InsertRulesInDB [21.8/24.2]
     prepare: o.j.q.SendResponse [0.1/24.4]
     prepare: c.o.a.TriggerMerchantBlockCacheReload [60241.7/60266.1]
      commit: c.o.a.PrepareContext [0.1/60266.2]
      commit: c.o.a.InsertRulesInDB [0.0/60266.3]
      commit: o.j.q.SendResponse [0.8/60267.1]
      commit: c.o.a.TriggerMerchantBlockCacheReload [0.0/60267.1]
     end [1.2/60268.3]
   </profiler>

So the question is why does the prepare not do anything in the SendResponse participant?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions