When using JCo (3.x) to read IDOCs sent from a SAP server, what action should be taken to indicate the message has been properly received (i.e. commit)?
In Java I imagine something like:
public class MyHandler implements JCoIDocHandler {
public void handleRequest(JCoServerContext serverCtx, IDocDocumentList documentList) {
IDocDocumentIterator iterator = documentList.iterator();
while (iterator.hasNext()) {
IDocDocument doc = iterator.next();
// some processing
}
// here I would like to say COMMIT
// i.e., I confirm all the documents have been read
// and our side takes ownership
}
}
This type of commit seems necessary if we want to make sure no message (IDOC) is lost, even if a bullet hits the CPU during some .hasNext()
call. Or am I wrong?