Package org.exist.storage.txn

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


            transact.commit(transaction);
            return targetDoc;
        } catch(final Exception e) {
            LOG.warn("Failed to store temporary fragment: " + e.getMessage(), e);
            //abort the transaction
            transact.abort(transaction);
        } finally {
            transact.close(transaction);
            //restore the user
            setUser(currentUser);
        }
View Full Code Here


        final Txn transaction = transact.beginTransaction();
        try {
            removeCollection(transaction, temp);
            transact.commit(transaction);
        } catch(final Exception e) {
            transact.abort(transaction);
            LOG.warn("Failed to remove temp collection: " + e.getMessage(), e);
        } finally {
            transact.close(transaction);
        }
    }
View Full Code Here

            checkIndex(docs, broker, null, null, 0);

            System.out.println("Test PASSED.");
        } catch (Exception e) {
            if (transact != null)
                transact.abort(transaction);
            e.printStackTrace();
            fail(e.getMessage());
        } finally {
            pool.release(broker);
        }
View Full Code Here

            assertEquals(1, seq.getItemCount());

            System.out.println("Test PASSED.");
        } catch (Exception e) {
            if (transact != null)
                transact.abort(transaction);
            e.printStackTrace();
            fail(e.getMessage());
        } finally {
            pool.release(broker);
        }
View Full Code Here

            checkIndex(docs, broker, null, null, 0);

            System.out.println("Test PASSED.");
        } catch (Exception e) {
            if (transact != null)
                transact.abort(transaction);
            e.printStackTrace();
            fail(e.getMessage());
        } finally {
            pool.release(broker);
        }
View Full Code Here

            checkIndex(docs, broker, new QName[] { new QName("item", "") }, "chair", 0);

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

                LOG.debug(String.format("Document %sd sucessfully", mode));
            }

        } catch (LockException e) {
            LOG.error("Resource is locked.", e);
            txnManager.abort(txn);
            throw new EXistException(e.getMessage());

        } catch (EXistException e) {
            LOG.error(e);
            txnManager.abort(txn);
View Full Code Here

            txnManager.abort(txn);
            throw new EXistException(e.getMessage());

        } catch (EXistException e) {
            LOG.error(e);
            txnManager.abort(txn);
            throw e;

        } catch (IOException | PermissionDeniedException | TriggerException e) {
            LOG.error(e);
            txnManager.abort(txn);
View Full Code Here

            txnManager.abort(txn);
            throw e;

        } catch (IOException | PermissionDeniedException | TriggerException e) {
            LOG.error(e);
            txnManager.abort(txn);
            throw new EXistException(e.getMessage());

        } finally {

            // TODO: check if can be done earlier
View Full Code Here


        } catch (EXistException | PermissionDeniedException e) {
            LOG.error(e);
            if (txnManager != null) {
                txnManager.abort(txn);
            }
            throw e;

        } finally {
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.