227228229230231232233234235236237
} catch(final IOException e) { abort("Could not load XQuery: " + e.getMessage()); } finally { if(context != null) { context.runCleanupTasks(); } //return the compiled query to the pool if(xqPool != null && source != null && compiled != null) { xqPool.returnCompiledXQuery(source, compiled);
487488489490491492493494495496497
Sequence resultSequence; try { resultSequence = xquery.execute(query, null, outputProperties); } finally { context.runCleanupTasks(); xquery.getXQueryPool().returnCompiledXQuery(source, query); } final String mediaType = outputProperties.getProperty(OutputKeys.MEDIA_TYPE); if (mediaType != null) {
15321533153415351536153715381539154015411542
try { final Sequence result = xquery.execute(compiled, null, outputProperties); writeResults(response, broker, result, -1, 1, false, outputProperties, wrap); } finally { context.runCleanupTasks(); pool.returnCompiledXQuery(source, compiled); } } /**
290291292293294295296297298299300
// Dirty, catch it all LOG.error(String.format("An error occured during preparation/execution of the xquery script %s: %s", path, t.getMessage()), t); } finally { if (context != null) { context.runCleanupTasks(); } } } /**