Package org.exist.storage.txn

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


            root.addBinaryResource(transaction, broker, XmldbURI.create(name), data.getBytes(), "application/xquery");

            transact.commit(transaction);
        } catch (Exception e) {
            if (transact != null)
                transact.abort(transaction);
            e.printStackTrace();
            fail(e.getMessage());
        } finally {
            pool.release(broker);
        }
View Full Code Here


                        collectionAccounts.removeXMLResource(txn, broker, XmldbURI.create( remove_account.getName() + ".xml"));

                        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

                    collectionGroups.removeXMLResource(txn, broker, XmldbURI.create(remove_group.getName() + ".xml" ));

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

                    broker.saveCollection(txn, systemCollection);

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

                  broker.saveCollection(txn, getTarget());
                 
                  txnManager.commit(txn);
               
              } catch (final Exception xe) {
                  txnManager.abort(txn);
                 
                  throw xe;

              } finally {
                    txnManager.close(txn);
View Full Code Here

                  }
                  broker.storeXMLResource(txn, getTarget());
                  txnManager.commit(txn);
               
              } catch(final Exception xe) {
                txnManager.abort(txn);
               
                throw xe;
               
              } finally {
                    txnManager.close(txn);
View Full Code Here

            appendChildren(transaction, nl, 0);
            broker.storeXMLResource(transaction, (DocumentImpl) getOwnerDocument());
            transact.commit(transaction); // bugID 3419602
            return getLastChild();
        } catch (final Exception e) {
            transact.abort(transaction);
            throw new DOMException(DOMException.INVALID_STATE_ERR, e.getMessage());
        } finally {
          if (broker != null) {
            try {
              transact.close(transaction);
View Full Code Here

            insertBefore(transaction, nl, refChild);
            broker.storeXMLResource(transaction, (DocumentImpl) getOwnerDocument());
            transact.commit(transaction);
            return refChild.getPreviousSibling();
        } catch(final TransactionException e) {
            transact.abort(transaction);
            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, e.getMessage());
        } catch (final EXistException e) {
            transact.abort(transaction);
            LOG.warn("Exception while inserting node: " + e.getMessage(), e);
        } finally {
View Full Code Here

            return refChild.getPreviousSibling();
        } catch(final TransactionException e) {
            transact.abort(transaction);
            throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, e.getMessage());
        } catch (final EXistException e) {
            transact.abort(transaction);
            LOG.warn("Exception while inserting node: " + e.getMessage(), e);
        } finally {
          if (broker != null) {
          try {
            transact.close(transaction);
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.