@Override public synchronized void setAutoCommit(boolean auto) throws RepositoryException { if (!auto && isAutoCommit()) { try { try { if (blobVersion != null) { try { blobVersion.prepare(); } catch (IOException exc) { throw new BlobConflictException(exc); } } super.setAutoCommit(auto); if (blobVersion != null) { blobVersion.commit(); blobVersion = null; } } finally { if (blobVersion != null) { blobVersion.rollback(); blobVersion = null; } } } catch (IOException e) { throw new BlobStoreException(e); } } else { super.setAutoCommit(auto); } }
@Override public synchronized void commit() throws RepositoryException { try { try { if (blobVersion != null) { try { blobVersion.prepare(); } catch (IOException exc) { throw new BlobConflictException(exc); } } super.commit(); if (blobVersion != null) { blobVersion.commit(); blobVersion = null; } } finally { if (blobVersion != null) { blobVersion.rollback(); } } } catch (IOException e) { throw new BlobStoreException(e); } }
@Override public void close() throws RepositoryException { try { super.close(); } finally { cachedObjects.clear(); } }
@Override public synchronized void rollback() throws RepositoryException { if (blobVersion != null) { try { blobVersion.rollback(); } catch (IOException e) { throw new RepositoryException(e.toString(), e); } } super.rollback(); cachedObjects.clear(); }