Package org.exist.collections

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


            transact.abort(txn);
            throw new RemoteException(e.getMessage(), e);
        } finally {
            transact.close(txn);
            if(collection != null)
                {collection.release(Lock.WRITE_LOCK);}
            pool.release(broker);
        }
//        documentCache.clear();
//        return doc != null;
    }
View Full Code Here


            return desc;
        } catch (final Exception ex){
            throw new RemoteException(ex.getMessage());
        } finally {
            if(collection != null)
                {collection.release(Lock.READ_LOCK);}
            pool.release(broker);
        }
    }
   
    @Override
View Full Code Here

            transact.abort(transaction);
            throw new RemoteException(e.getMessage());
    } finally {
            transact.close(transaction);
            if(destination != null)
                {destination.release(Lock.WRITE_LOCK);}
            if(doc != null)
                {doc.getUpdateLock().release(Lock.WRITE_LOCK);}
            if(collection != null)
                {collection.release(move ? Lock.WRITE_LOCK : Lock.READ_LOCK);}
            pool.release(broker);
View Full Code Here

    } finally {
            transact.close(transaction);
            if(collection != null)
                {collection.release(move ? Lock.WRITE_LOCK : Lock.READ_LOCK);}
            if(destination != null)
                {destination.release(Lock.WRITE_LOCK);}
            pool.release(broker);
        }
    }
   
    @Override
View Full Code Here

              p.setGroup(perm.getGroup().getName());
              p.setPermissions(perm.getMode());
              return p;
            } finally {
              if (collection != null)
                {collection.release(Lock.READ_LOCK);}             
            }
        } catch (final Exception ex) {
            throw new RemoteException(ex.getMessage());
        } finally {
            pool.release(broker);
View Full Code Here

            return new EntityPermissionsList(result);
        } catch (final Exception ex) {
            throw new RemoteException(ex.getMessage());
        } finally {
            if(collection != null)
                {collection.release(Lock.READ_LOCK);}
            pool.release(broker);
        }
    }
   
    @Override
View Full Code Here

            return new IndexedElements(result);
        } catch (final Exception ex) {
            throw new RemoteException(ex.getMessage());
        } finally {
            if(collection != null)
                {collection.release(Lock.READ_LOCK);}
            pool.release(broker);
        }
    }
   
}
View Full Code Here

        } finally {

            // TODO: check if can be done earlier
            if (collection != null) {
                collection.release(Lock.WRITE_LOCK);
            }
            txnManager.close(txn);
            brokerPool.release(broker);

            if (LOG.isDebugEnabled()) {
View Full Code Here

        } finally {

            // TODO: check if can be done earlier
            if (destCollection != null) {
                destCollection.release(Lock.WRITE_LOCK);
            }

            if (srcCollection != null) {
                srcCollection.release(Lock.WRITE_LOCK);
            }
View Full Code Here

           
            // First check if resource is a collection
            collection = broker.openCollection(xmldbUri, Lock.READ_LOCK);
            if (collection != null) {
                type = ResourceType.COLLECTION;
                collection.release(Lock.READ_LOCK);
                collection = null;

            } else {
                // If it is not a collection, check if it is a document
                document = broker.getXMLResource(xmldbUri, Lock.READ_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.