Package org.apache.cocoon.environment

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


                }
            } catch (Exception e) {
                logger.error("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();
            }
        }

        return conf.configuration;
    }
View Full Code Here


                getLogger().warn("Cannot load configuration from " + configUrl);
                throw new ConfigurationException("Cannot load configuration from " + configUrl, e);
            } finally {
                manager.release(urlFactory);
                if (configSource != null) {
                    configSource.recycle();
                }
            }
        }

        // Get the mime type.
View Full Code Here

            throw e;
        } catch (Exception e) {
            throw new ProcessingException(
                    "Exception in ScriptAction.act()", e);
        } finally {
            if (src != null) src.recycle();
        } // try/catch
    } // public Map act(...)
} // public class ScriptAction
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();
            }
        }

        return conf.configuration;
    }
View Full Code Here

        } catch (Exception e) {
            getLogger().debug("Exception", e);
            return null;
        } finally {
            if (src != null) {
                src.recycle();
            }
        }
        return EMPTY_MAP;
    }
}
View Full Code Here

            }
            debug("catalog directory:" + systemId);
            dirConf.setValue(systemId);
            configuration.addChild(dirConf);
        } finally {
            source.recycle();
        }

        // Pass created configuration object to the factory
        factory.configure(configuration);
        debug("configured");
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

            throw e;
        } catch (Exception e) {
            getLogger().debug("PhpGenerator.generate()", e);
            throw new IOException(e.toString());
        } finally {
            if (inputSource != null) inputSource.recycle();
            this.manager.release(parser);
        }
    }
}
View Full Code Here

                getLogger().warn("Cannot load configuration from " + configUrl);
                throw new ConfigurationException("Cannot load configuration from " + configUrl, e);
            } finally {
                this.manager.release(urlFactory);
                if (configSource != null) {
                    configSource.recycle();
                }
            }
        }
    }
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

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.