Search in sources :

Example 1 with JCoIDocServer

use of com.sap.conn.idoc.jco.JCoIDocServer in project iaf by ibissource.

the class SapListener method open.

public void open() throws ListenerException {
    try {
        openFacade();
        log.debug(getLogPrefix() + "register ServerDataProvider");
        Environment.registerServerDataProvider(this);
        serverDataEventListener.updated(getName());
        log.debug(getLogPrefix() + "start server");
        JCoIDocServer server = JCoIDoc.getServer(getName());
        server.setCallHandlerFactory(functionHandlerFactory);
        server.setIDocHandlerFactory(this);
        server.setTIDHandler(this);
        server.addServerErrorListener(this);
        server.addServerExceptionListener(this);
        server.start();
    } catch (Exception e) {
        try {
            close();
        } catch (Exception e2) {
            log.warn("exception closing SapListener after exception opening listener", e2);
        }
        throw new ListenerException(getLogPrefix() + "could not start", e);
    }
}
Also used : JCoIDocServer(com.sap.conn.idoc.jco.JCoIDocServer) ListenerException(nl.nn.adapterframework.core.ListenerException) JCoRuntimeException(com.sap.conn.jco.JCoRuntimeException) ListenerException(nl.nn.adapterframework.core.ListenerException) JCoException(com.sap.conn.jco.JCoException) AbapClassException(com.sap.conn.jco.AbapClassException) ConfigurationException(nl.nn.adapterframework.configuration.ConfigurationException) AbapException(com.sap.conn.jco.AbapException)

Aggregations

JCoIDocServer (com.sap.conn.idoc.jco.JCoIDocServer)1 AbapClassException (com.sap.conn.jco.AbapClassException)1 AbapException (com.sap.conn.jco.AbapException)1 JCoException (com.sap.conn.jco.JCoException)1 JCoRuntimeException (com.sap.conn.jco.JCoRuntimeException)1 ConfigurationException (nl.nn.adapterframework.configuration.ConfigurationException)1 ListenerException (nl.nn.adapterframework.core.ListenerException)1