throw new ObjectStoreException("This ObjectStoreWriter is already closed");
throw new ObjectStoreException("This ObjectStoreWriter is already closed in situation: " + closeSituation + ", present stack trace:");
    public synchronized void close() throws ObjectStoreException {        if (conn == null) {            // This writer is already closed            throw new ObjectStoreException("This ObjectStoreWriter is already closed");        }        if (connInUse) {            conn = null;            throw new ObjectStoreException("Closed ObjectStoreWriter while it is being used. Note"                    + " this writer will be automatically closed when the current operation"                    + " finishes");        } else {            try {                if (isInTransactionWithConnection(conn)) {                    abortTransactionWithConnection(conn);                    LOG.error("ObjectStoreWriterInterMineImpl closed in unfinished transaction"                            + " - transaction aborted");                }            } catch (Exception e) {                LOG.error("Exception caught when destroying transaction while closing"                        + " ObjectStoreWriter", e);            }            try {                batch.close(conn);            } catch (Exception e) {                LOG.error("Exception caught when closing Batch while closing ObjectStoreWriter", e);            }            try {                os.releaseConnection(conn);            } catch (Exception e) {                // ignore            }            conn = null;            connInUse = true;            notifyAll();        }    }