Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3019

Re: SAP JCO v3 with IDoc - What happens if Destination.confirmTID() method fails?

$
0
0

Hi Paul,

 

confirmTID() is telling the server system that the client knows that the tRFC call (or more specific in your case the IDoc) has been executed successfully and that the client will not send the same transaction again. Therefore, the server knows that it can safely remove the TID (transaction ID) from its transaction management without risking duplicate execution of transactions. This is certainly only true, if the client is behaving according to the protocol and is not re-executing the transaction even though everything was executed successfully. If confirmTID() is failing, this does not hurt so much. Only transaction management tables will increase over time, but typically, there are cleanup jobs running that assume that a missing confirm is ok after e.g. 24 hours.

So, in your case you can assume everything to be ok as soon as JCoIDoc.send() has been executed without an exception and remove the message afterwards from the JMS queue. Only in case JCoIDoc.send() is throwing an exception, you need to re-execute the send method for the same message and leave the message inthe JMS queue. After you have removed the message from the queue, you can execute confirmTID(). If it fails for some reason, you can repeat it later as well, but you don't need to try forever. The confirmTID() is of less importance, however, it can be considered nice by a client to invoke it, as the server can cleanup its TID management.

 

Best regards,

Markus


Viewing all articles
Browse latest Browse all 3019

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>