DBBroker broker = null; try { broker = brokerPool.get(); broker.sync(); } catch (EXistException e) { throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e.getMessage(), e); } finally { brokerPool.release(broker); }
if(needsSync) { DBBroker broker = null; try { broker = brokerPool.get(); broker.sync(); } catch (EXistException e) { throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e.getMessage(), e); } finally { brokerPool.release(broker); } }
    public void close() throws XMLDBException {		DBBroker broker = null;		try {			broker = brokerPool.get();			broker.sync();		} catch (EXistException e) {			throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, e.getMessage(), e);		} finally {			brokerPool.release(broker);		}    }