@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); } }