use of com.sap.conn.jco.server.JCoServer in project iaf by ibissource.
the class SapListener method close.
public void close() throws ListenerException {
try {
log.debug(getLogPrefix() + "stop server");
JCoServer server = JCoServerFactory.getServer(getName());
server.stop();
log.debug(getLogPrefix() + "unregister ServerDataProvider");
// Delete doesn't work after stopping the server, when calling
// delete first the stop method will fail.
// serverDataEventListener.deleted(getName());
} catch (Exception e) {
throw new ListenerException(getLogPrefix() + "could not stop", e);
} finally {
try {
Environment.unregisterServerDataProvider(this);
} catch (Exception e) {
throw new ListenerException(getLogPrefix() + "could not unregister", e);
} finally {
closeFacade();
}
}
}
Aggregations