Package org.exist.collections

Examples of org.exist.collections.Collection.release()


        } finally {
            if(broker != null) {
                brokerPool.release(broker);
                brokerPool.setSubject(subject);
            }
            collection.release(Lock.READ_LOCK);
        }
        if(childName != null) {
            return new LocalCollection(user, brokerPool, this, childName, accessCtx);
        }
       
View Full Code Here


    public String getName() throws XMLDBException {
        final Collection collection = getCollectionWithLock(Lock.READ_LOCK);
        try {
            return collection.getURI().toString();
        } finally {
            collection.release(Lock.READ_LOCK);
        }
    }

    @Override
    public org.xmldb.api.base.Collection getParentCollection() throws XMLDBException {
View Full Code Here

        } catch(final EXistException e) {
            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR,
                "Error while retrieving resource: " + e.getMessage(), e);
        } finally {
            if(collection != null) {
                collection.release(Lock.READ_LOCK);
            }
            brokerPool.release(broker);
            brokerPool.setSubject(subject);
        }
    }
View Full Code Here

                brokerPool.release(broker);
                brokerPool.setSubject(subject);
            }
           
            if(collection != null) {
                collection.release(Lock.READ_LOCK);
            }
        }
    }

    @Override
View Full Code Here

            throw new XMLDBException(ErrorCodes.PERMISSION_DENIED, e.getMessage(), e);
        } catch(final EXistException e) {
            throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, "Error while retrieving resource: " + e.getMessage(), e);
        } finally {
            if(collection != null) {
                collection.release(Lock.READ_LOCK);
            }
            brokerPool.release(broker);
            brokerPool.setSubject(subject);
        }
    }
View Full Code Here

                if (res.datemodified != null) {
                    info.getDocument().getMetadata().setLastModified(res.datemodified.getTime());
                }
            } finally {
                if(collection != null) {
                    collection.release(Lock.WRITE_LOCK);
                }
            }
           
            if (uri != null || res.inputSource!=null) {
                collection.store(txn, broker, info, (uri!=null) ? new InputSource(uri):res.inputSource, false);
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.