Examples of returnCompiledXQuery()


Examples of org.exist.storage.XQueryPool.returnCompiledXQuery()

                context.runCleanupTasks();
            }
           
            //return the compiled query to the pool
            if(xqPool != null && source != null && compiled != null) {
                xqPool.returnCompiledXQuery(source, compiled);
            }

            //release the lock on the xquery resource
            if(resource != null) {
                resource.getUpdateLock().release(Lock.READ_LOCK);
View Full Code Here

Examples of org.exist.storage.XQueryPool.returnCompiledXQuery()

   
    Sequence resultSeq = null;
    try {
      resultSeq = xquery.execute(compiled, null);
    } finally {
      pool.returnCompiledXQuery(source, compiled);
    }

    if (!(resultSeq.isEmpty() || Type.subTypeOf(resultSeq.getItemType(), Type.NODE)))
      {throw new EXistException("select expression should evaluate to a node-set; got " +
              Type.getTypeName(resultSeq.getItemType()));}
View Full Code Here

Examples of org.exist.storage.XQueryPool.returnCompiledXQuery()

   
    Sequence seq = null;
    try {
      seq = xquery.execute(compiled, null);
    } finally {
      pool.returnCompiledXQuery(source, compiled);
    }
    if(seq.effectiveBooleanValue()) {
      long mods = 0;
      for (final Modification modification : modifications) {
        mods += modification.process(transaction);
View Full Code Here

Examples of org.exist.storage.XQueryPool.returnCompiledXQuery()

            if (s.isEmpty())
                return 0;
            IntegerValue iv = (IntegerValue) s.itemAt(0);
            return iv.getLong();
        } finally {
            pool.returnCompiledXQuery(GET_CURRENT_REV_SOURCE, compiled);
        }
    }

    public static boolean newerRevisionExists(DBBroker broker, XmldbURI docPath, long baseRev, String key) throws XPathException, IOException, PermissionDeniedException {
        String docName = docPath.lastSegment().toString();
View Full Code Here

Examples of org.exist.storage.XQueryPool.returnCompiledXQuery()

            compiled = xquery.compile(context, GET_CONFLICTING_REV_SOURCE);
        try {
            Sequence s = xquery.execute(compiled, Sequence.EMPTY_SEQUENCE);
            return !s.isEmpty();
        } finally {
            pool.returnCompiledXQuery(GET_CONFLICTING_REV_SOURCE, compiled);
        }
    }

    public static long getBaseRevision(DBBroker broker, XmldbURI docPath, long baseRev, String sessionKey) throws XPathException, IOException, PermissionDeniedException {
        String docName = docPath.lastSegment().toString();
View Full Code Here

Examples of org.exist.storage.XQueryPool.returnCompiledXQuery()

                return 0;

            IntegerValue iv = (IntegerValue) s.itemAt(0);
            return iv.getLong();
        } finally {
            pool.returnCompiledXQuery(GET_BASE_REV_FOR_KEY_SOURCE, compiled);
        }
    }
}
View Full Code Here

Examples of org.exist.storage.XQueryPool.returnCompiledXQuery()

            handleException(e);

        } finally {
            factory.getBrokerPool().release(broker);
            if(compiled != null && pool != null)
                {pool.returnCompiledXQuery(source, compiled);}
        }
        return ret;
    }
   
    /**
 
View Full Code Here

Examples of org.exist.storage.XQueryPool.returnCompiledXQuery()

            compiled = xquery.compile(context, TEST_XQUERY);
          }
        try {
          xquery.execute(compiled, null);
        } finally {
          xqPool.returnCompiledXQuery(TEST_XQUERY, compiled);
        }
        }
      } catch (final Exception e) {
      lastPingRespTime = -2;
      taskstatus.setStatus(TaskStatus.Status.PING_ERROR);
View Full Code Here

Examples of org.exist.storage.XQueryPool.returnCompiledXQuery()

                throw new XPathException("Failed to compile query: " + xqSource.toString() , e);
            }
        }
       
        //store the compiled xqws for use later
        pool.returnCompiledXQuery(xqSource, compiled);
       
        return compiled;
    }
   
    /**
 
View Full Code Here

Examples of org.exist.storage.XQueryPool.returnCompiledXQuery()

        } catch (final PermissionDeniedException e) {
            throw new XPathException(this, e);
    } finally {
            if(compiled != null) {
                if(cache) {
                    pool.returnCompiledXQuery(querySource, compiled);
                } else {
                    compiled.reset();
                }
            }
        }
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.