Package org.exist.storage.txn

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


                    {broker.removeCollection(txn, collection);}
            }
            mgr.commit(txn);
        } catch (final Exception e) {
            LOG.error("Exception occurred while removing package.", e);
            mgr.abort(txn);
        } finally {
            mgr.close(txn);
        }
    }
View Full Code Here


            collection.store(txn, broker, info, updatedXML, false);

            mgr.commit(txn);
        } catch (final Exception e) {
            mgr.abort(txn);
        } finally {
            mgr.close(txn);
        }
    }
View Full Code Here

            collection = broker.getOrCreateCollection(txn, target);
            setPermissions(true, null, collection.getPermissionsNoLock());
            broker.saveCollection(txn, collection);
            mgr.commit(txn);
        } catch (final Exception e) {
            mgr.abort(txn);
        } finally {
            mgr.close(txn);
        }

        try {
View Full Code Here

                        doc.getMetadata().setMimeType(mime.getName());
                        broker.storeXMLResource(txn, doc);
                    }
                    mgr.commit(txn);
                } catch (final Exception e) {
                    mgr.abort(txn);
                    e.printStackTrace();
                } finally {
                    mgr.close(txn);
                }
            }
View Full Code Here

           
                broker.saveCollection(txn, currentCollection);

            txnManager.commit(txn);
          } catch (final Exception e) {
            txnManager.abort(txn);
            throw new SAXException(e);
        } finally {
                txnManager.close(txn);
            }
View Full Code Here

                listener.restored(name);
               
                return deferredPermission;
      } catch (final Exception e) {
        txnManager.abort(txn);
        throw new IOException(e);
      } finally {
                txnManager.close(txn);
//        if (resource != null)
//          resource.getUpdateLock().release(Lock.READ_LOCK);
View Full Code Here

              final Txn txn = txnManager.beginTransaction();
              try {
                    broker.removeCollection(txn, col);
                txnManager.commit(txn);
              } catch (final Exception e) {
                txnManager.abort(txn);
               
                    listener.warn("Failed to remove deleted collection: " + name + ": " + e.getMessage());
          } finally {
                        txnManager.close(txn);
                    }
View Full Code Here

                    currentCollection.removeXMLResource(txn, broker, uri);
                  }
                  txnManager.commit(txn);
 
                } catch(final Exception e) {
                  txnManager.abort(txn);
                 
                    listener.warn("Failed to remove deleted resource: " + name + ": " + e.getMessage());
                } finally {
                        txnManager.close(txn);
                    }
View Full Code Here

       
        txnManager.commit(txn);
       
        return col;
      } catch (final Exception e) {
        txnManager.abort(txn);
        throw new SAXException(e);
    } finally {
            txnManager.close(txn);
        }
    }
View Full Code Here

        broker.saveCollection(txn, collection);

        transaction.commit(txn);
      }
        } catch (final Exception e) {
      transaction.abort(txn);
      e.printStackTrace();
      LOG.debug("loading configuration failed: " + e.getMessage());
    } finally {
            transaction.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.