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);
}
}
Aggregations