Reversal of transaction

113 views
Skip to first unread message

pks!!@

unread,
Jan 24, 2017, 7:00:27 AM1/24/17
to jPOS Users

Here, i need a guide on start a reversal on get a null response.

As below, these are my configuration Xmls.

100_mux.xml =>

<mux class="org.jpos.q2.iso.QMUX" logger="Q2" name="host-mux">
 <in>receive</in>
 <out>send</out>
 <ready>adaptor.ready</ready>
 <request-listener class="xxx.xxx.RequestListener" logger="Q2">
    <property name="space" value="REQ_SPACE"/>
    <property name="queue" value="REQ_QUEUE"/>
  </request-listener>
</mux>


101_channel.xml =>

<channel-adaptor name='adaptor' class="org.jpos.q2.iso.ChannelAdaptor" logger="Q2">
<channel class="org.jpos.iso.channel.NACChannel" logger="Q2" packager="org.jpos.iso.packager.ISO87APackagerBBitmap">
<property name="host" value="localhost" /> 
<property name="port" value="8073" /> 
</channel>
<in>host-send</in> 
<out>host-receive</out> 
<reconnect-delay>10000</reconnect-delay>
</channel-adaptor>


group part of 500_txn_manager.xml => 

<group name="testa"> 
 <participant class="XXX.XXX.CreateRequest" logger="Q2" realm="create-request">
<property name="space" value="jdbm:svc-stan" />
<property name="checkpoint" value="create-request" />
</participant>
<participant class="XXX.XXX.Continuation" logger="Q2" realm="query-remote-host">
<property name="target_mux" value="host-mux" />
<property name="timeout" value="10000" />
<property name="threshold" value="12000" />
<property name="checkpoint" value="query-ycs-host" />
<property name="reverse-on-timeout" value="true" />
 </participant>
</group>  


and as below i am sending message at localhost:8073

ISOMsg resp = mux.request(req, this.cfg.getLong("timeout"));

if (resp != null) {

}else{

// Here i have to do reversal.

}


Please guide me. What steps should i follow.

Thanks & Regards
pk

chhil

unread,
Jan 24, 2017, 7:14:09 AM1/24/17
to jpos-...@googlegroups.com

When you don't get a response for requests you need to decline the message to the sender  create an equivalent reversal message based on your spec and send the reversal to the host.
This reversal probably needs to be retried based on the response received response code or no response.
For this you need a SAF module from jposee,  you configure the deploy and load it from the nameregistrar and do a saf.send passing it the newly created reversal message. Saf based on the deploy configuration will retry n number of times based on response code configured in the saf deploy.

-chhil


--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To post to this group, send email to jpos-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/11f140ea-9e30-4fbe-91b3-8555cfc0d46f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

pks!!@

unread,
Jan 24, 2017, 8:08:09 AM1/24/17
to jPOS Users
Hello Sir,

 Thanks for your guideline. Can you share me some useful links or examples.


Thanks & Regards
pk

chhil

unread,
Jan 24, 2017, 8:24:38 AM1/24/17
to jpos-...@googlegroups.com

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+unsubscribe@googlegroups.com.

To post to this group, send email to jpos-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages