Search in sources :

Example 1 with HttpOutEvent

use of org.bedework.sysevents.events.HttpOutEvent in project bw-calendar-engine by Bedework.

the class BwSysIntfImpl method close.

private void close(CalSvcI svci) throws WebdavException {
    if ((svci == null) || !svci.isOpen()) {
        return;
    }
    try {
        svci.endTransaction();
        long reqTime = System.currentTimeMillis() - reqInTime;
        svci.postNotification(new HttpOutEvent(SysCode.CALDAV_OUT, reqTime));
    } catch (Throwable t) {
        try {
            svci.close();
        } catch (Throwable t1) {
        }
        svci = null;
        if (t instanceof CalFacadeStaleStateException) {
            throw new WebdavException(HttpServletResponse.SC_CONFLICT);
        }
        throw new WebdavException(t);
    }
    try {
        svci.close();
    } catch (Throwable t) {
        svci = null;
        throw new WebdavException(t);
    }
}
Also used : CalFacadeStaleStateException(org.bedework.calfacade.exc.CalFacadeStaleStateException) WebdavException(org.bedework.webdav.servlet.shared.WebdavException) HttpOutEvent(org.bedework.sysevents.events.HttpOutEvent)

Aggregations

CalFacadeStaleStateException (org.bedework.calfacade.exc.CalFacadeStaleStateException)1 HttpOutEvent (org.bedework.sysevents.events.HttpOutEvent)1 WebdavException (org.bedework.webdav.servlet.shared.WebdavException)1