Esempio n. 1
0
 @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);
   }
 }
Esempio n. 2
0
 @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);
   }
 }
Esempio n. 3
0
 @Override
 public void close() throws RepositoryException {
   try {
     super.close();
   } finally {
     cachedObjects.clear();
   }
 }
Esempio n. 4
0
 @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();
 }