Search in sources :

Example 1 with SapException

use of nl.nn.adapterframework.extensions.sap.jco2.SapException in project iaf by ibissource.

the class JcoResourceHolder method commitAll.

public void commitAll() throws SapException {
    for (Iterator itc = this.destinations.iterator(); itc.hasNext(); ) {
        JCoDestination destination = (JCoDestination) itc.next();
        List tids = (List) this.tidsPerDestination.get(destination);
        for (Iterator itt = tids.iterator(); itt.hasNext(); ) {
            String tid = (String) itt.next();
            try {
                destination.confirmTID(tid);
            } catch (Throwable t) {
                throw new SapException("Could not confirm TID [" + tid + "]");
            }
        }
    }
}
Also used : JCoDestination(com.sap.conn.jco.JCoDestination) Iterator(java.util.Iterator) List(java.util.List) LinkedList(java.util.LinkedList) SapException(nl.nn.adapterframework.extensions.sap.jco3.SapException)

Example 2 with SapException

use of nl.nn.adapterframework.extensions.sap.jco2.SapException in project iaf by ibissource.

the class JcoResourceHolder method commitAll.

public void commitAll() throws SapException {
    for (Iterator itc = this.clients.iterator(); itc.hasNext(); ) {
        JCO.Client client = (JCO.Client) itc.next();
        List tids = (List) this.tidsPerClient.get(client);
        for (Iterator itt = tids.iterator(); itt.hasNext(); ) {
            String tid = (String) itt.next();
            try {
                client.confirmTID(tid);
            } catch (Throwable t) {
                throw new SapException("Could not confirm TID [" + tid + "]");
            }
        }
    }
}
Also used : JCO(com.sap.mw.jco.JCO) Iterator(java.util.Iterator) List(java.util.List) LinkedList(java.util.LinkedList) SapException(nl.nn.adapterframework.extensions.sap.jco2.SapException)

Aggregations

Iterator (java.util.Iterator)2 LinkedList (java.util.LinkedList)2 List (java.util.List)2 JCoDestination (com.sap.conn.jco.JCoDestination)1 JCO (com.sap.mw.jco.JCO)1 SapException (nl.nn.adapterframework.extensions.sap.jco2.SapException)1 SapException (nl.nn.adapterframework.extensions.sap.jco3.SapException)1