Package org.exist.storage.txn

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


            broker = pool.get(session.getUser());
// TODO check XML/Binary resource
//            DocumentImpl doc = (DocumentImpl)broker.getDocument(documentName);
            final DocumentImpl doc = broker.getXMLResource(documentName, Permission.READ);
            if (doc == null) {
                transact.abort(transaction);
                throw new RemoteException(
                        "document " + documentName + " not found");
            }
            final MutableDocumentSet docs = new DefaultDocumentSet();
            docs.add(doc);
View Full Code Here


            // Release lock, as reported http://markmail.org/message/pau6hoaeybg2bvch
            doc.getUpdateLock().release(Permission.READ);
           
            return (int) mods;
        } catch (final ParserConfigurationException e) {
            transact.abort(transaction);
            throw new RemoteException(e.getMessage(), e);
        } catch (final IOException e) {
            transact.abort(transaction);
            throw new RemoteException(e.getMessage(), e);
        } catch (final EXistException e) {
View Full Code Here

            return (int) mods;
        } catch (final ParserConfigurationException e) {
            transact.abort(transaction);
            throw new RemoteException(e.getMessage(), e);
        } catch (final IOException e) {
            transact.abort(transaction);
            throw new RemoteException(e.getMessage(), e);
        } catch (final EXistException e) {
            transact.abort(transaction);
            throw new RemoteException(e.getMessage(), e);
        } catch (final SAXException e) {
View Full Code Here

            throw new RemoteException(e.getMessage(), e);
        } catch (final IOException e) {
            transact.abort(transaction);
            throw new RemoteException(e.getMessage(), e);
        } catch (final EXistException e) {
            transact.abort(transaction);
            throw new RemoteException(e.getMessage(), e);
        } catch (final SAXException e) {
            transact.abort(transaction);
            throw new RemoteException(e.getMessage(), e);
        } catch (final PermissionDeniedException e) {
View Full Code Here

            throw new RemoteException(e.getMessage(), e);
        } catch (final EXistException e) {
            transact.abort(transaction);
            throw new RemoteException(e.getMessage(), e);
        } catch (final SAXException e) {
            transact.abort(transaction);
            throw new RemoteException(e.getMessage(), e);
        } catch (final PermissionDeniedException e) {
            transact.abort(transaction);
            throw new RemoteException(e.getMessage(), e);
        } catch (final XPathException e) {
View Full Code Here

            throw new RemoteException(e.getMessage(), e);
        } catch (final SAXException e) {
            transact.abort(transaction);
            throw new RemoteException(e.getMessage(), e);
        } catch (final PermissionDeniedException e) {
            transact.abort(transaction);
            throw new RemoteException(e.getMessage(), e);
        } catch (final XPathException e) {
            transact.abort(transaction);
            throw new RemoteException(e.getMessage(), e);
        } catch (final LockException e) {
View Full Code Here

            throw new RemoteException(e.getMessage(), e);
        } catch (final PermissionDeniedException e) {
            transact.abort(transaction);
            throw new RemoteException(e.getMessage(), e);
        } catch (final XPathException e) {
            transact.abort(transaction);
            throw new RemoteException(e.getMessage(), e);
        } catch (final LockException e) {
            transact.abort(transaction);
            throw new RemoteException(e.getMessage(), e);
        } finally {
View Full Code Here

            throw new RemoteException(e.getMessage(), e);
        } catch (final XPathException e) {
            transact.abort(transaction);
            throw new RemoteException(e.getMessage(), e);
        } catch (final LockException e) {
            transact.abort(transaction);
            throw new RemoteException(e.getMessage(), e);
        } finally {
            transact.close(transaction);
            pool.release(broker);
        }
View Full Code Here

        try {
            broker = pool.get(session.getUser());
            final XmldbURI collectionUri = path.removeLastSegment();
            final XmldbURI docUri = path.lastSegment();
            if (collectionUri==null || docUri==null) {
                transact.abort(txn);
                throw new EXistException("Illegal document path");
            }
            collection = broker.openCollection(collectionUri, Lock.WRITE_LOCK);
            if (collection == null)
                {throw new EXistException("Collection " + collectionUri
View Full Code Here

//                doc.setCreated(created.getTime());
//            if (modified != null)
//                doc.setLastModified(modified.getTime());
            transact.commit(txn);
        } catch (final Exception e) {
            transact.abort(txn);
            throw new RemoteException(e.getMessage(), e);
        } finally {
            transact.close(txn);
            if(collection != null)
                {collection.release(Lock.WRITE_LOCK);}
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.