Package org.apache.cocoon.environment

Examples of org.apache.cocoon.environment.Source.recycle()


            try {
                InputSource xslsrc = source.getInputSource();
                loaderprocessor.loadStylesheet(xslsrc);
                if (store != null) store.store(xsluri, loaderprocessor);
            } finally {
                source.recycle();
            }
        }

        // Always clone the processor before using it,
        // Indeed 1 instance per thread is allowed
View Full Code Here


            throw new SAXException("CIncludeTransformer could not read resource", e);
        } catch (ProcessingException e){
            getLogger().error("Could not stream input", e);
            throw new SAXException("Exception in CIncludeTransformer",e);
        } finally {
            source.recycle();
        }

        if (!"".equals(element)) {
            super.endElement(ns, element, (!ns.equals("") && !prefix.equals("") ? prefix+":"+element : element));
            if (!ns.equals("")) {
View Full Code Here

            } catch (SAXException se) {
                throw new IOException("SAXException: " + se);
            } catch (ProcessingException pe) {
                throw new IOException("ProcessingException: " + pe);
            } finally {
                if (redirectSource != null) redirectSource.recycle();
            }
        } else {
            Source redirectSource = null;
            try {
                redirectSource = this.resolve(newURL);
View Full Code Here

            } catch (SAXException se) {
                throw new IOException("SAXException: " + se);
            } catch (ProcessingException pe) {
                throw new IOException("ProcessingException: " + pe);
            } finally {
                if (redirectSource != null) redirectSource.recycle();
            }
        }
    }

    /**
 
View Full Code Here

                        timeStamp == 0)
                        return false;
                } catch (Exception e) {
                    return false;
                } finally {
                    if (otherSource != null) otherSource.recycle();
                }
            }
            return true;
        }
        return false;
View Full Code Here

                    }
                } catch (Exception e) {
                    getLogger().error("Could not configure Database mapping environment", e);
                    throw new ConfigurationException("Error trying to load configurations for resource: " + (resource == null ? "null" : resource.getSystemId()));
                } finally {
                    if (resource != null) resource.recycle();
                    this.manager.release(sourceHandler);
                }
        } else {
        getLogger().debug("Using fixed cached configuration for " + descriptor);
        }
View Full Code Here

        } catch (SAXException se) {
            throw new TransformerException(se);
        } catch (ProcessingException pe) {
            throw new TransformerException(pe);
        } finally {
            if (xslSource != null) xslSource.recycle();
        }
    }

    public void setSourceResolver(SourceResolver resolver) {
        this.resolver = resolver;
View Full Code Here

            src.getInputStream();
        } catch (Exception e) {
            getLogger().debug("ResourceExistsAction: exception: ",e);
            return null;
        } finally {
            if (src != null) src.recycle();
        }
        return EMPTY_MAP;
    }

}
View Full Code Here

            throw e;
        } catch (Exception e) {
            getLogger().debug("Exception in JSPReader.generate()", e);
            throw new ProcessingException("Exception JSPReader.generate()",e);
        } finally {
            if (src != null) src.recycle();
            if (engine != null) this.manager.release(engine);
        }
    }
}
View Full Code Here

                }
            } catch (Exception e) {
                logger.error("XSPFormValidatorHelper.getConfiguration: Could not configure Database mapping environment", e);
                throw new ConfigurationException("Error trying to load configurations for resource: " + source.getSystemId());
            } finally {
                if (source != null) source.recycle();
                manager.release(sourceHandler);
            }
        }

        return conf.configuration;
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.