Package org.exist.storage.txn

Examples of org.exist.storage.txn.TransactionManager.abort()


      try {
        final Collection child = broker.getOrCreateCollection(transaction, uri.toCollectionPathURI());
        broker.saveCollection(transaction, child);
        tm.commit(transaction);
      } catch (final Exception e) {
          tm.abort(transaction);
        return false;
      } finally {
                tm.close(transaction);
            }
        } catch (final Exception e) {
View Full Code Here


      try {
        final Collection child = broker.getOrCreateCollection(transaction, uri.toCollectionPathURI());
        broker.saveCollection(transaction, child);
        tm.commit(transaction);
      } catch (final Exception e) {
          tm.abort(transaction);
        return false;
      } finally {
                tm.close(transaction);
            }
View Full Code Here

              tm.commit(transaction);
              return true;
             
          } catch ( final Exception e ) {
            e.printStackTrace();
            if (transaction != null) {tm.abort(transaction);}
            return false;
          } finally {
                tm.close(transaction);
            if(source != null) {source.release(Lock.WRITE_LOCK);}
            if(destination != null) {destination.release(Lock.WRITE_LOCK);}
View Full Code Here

                tm.commit(transaction);
                return true;
               
            } catch ( final Exception e ) {
                e.printStackTrace();
                if (transaction != null) {tm.abort(transaction);}
                return false;
            } finally {
                tm.close(transaction);
                if(source != null) {source.release(Lock.WRITE_LOCK);}
                if(destination != null) {destination.release(Lock.WRITE_LOCK);}
View Full Code Here

            tm.commit(txn);
           
        } catch ( final Exception e ) {
            e.printStackTrace();
            if (txn != null) {tm.abort(txn);}
      } finally {
            tm.close(txn);
          if (db != null)
              {db.release( broker );}
      }
View Full Code Here

             
              tm.commit(txn);
              return true;
 
          } catch (final Exception e) {
            if (txn != null) {tm.abort(txn);}
              return false;
          } finally {
                tm.close(txn);
            }
        } finally {
View Full Code Here

              mimeType.getName(), 0L , new Date(), new Date());
 
        }
        tm.commit(transaction);
      } catch (final Exception e) {
        tm.abort(transaction);
        throw new IOException(e);
      } finally {
                tm.close(transaction);
        closeFile(is);
 
View Full Code Here

            tm.commit(txn);
          }
        }
      } catch (final IOException e) {
        if (txn != null) {
          tm.abort(txn);
        }
        throw e;
      } catch (final Exception e) {
        if (txn != null) {
          tm.abort(txn);
View Full Code Here

          tm.abort(txn);
        }
        throw e;
      } catch (final Exception e) {
        if (txn != null) {
          tm.abort(txn);
        }
        throw new IOException(e);
      } finally {
                tm.close(txn);
        if (resource != null)
View Full Code Here

   
                txManager.commit(txn);
            }
        } catch (Exception e) {
            if (txn != null) {
                txManager.abort(txn);
            }
            System.out.println("fail to load file "+file.getName());
            e.printStackTrace();
        } finally {
            txManager.close(txn);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.