Package org.apache.cocoon.environment

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


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


                    programInstance = (CompiledComponent) select(normalizedName);
            }

            return programInstance;
        } finally {
            source.recycle();
        }
    }

    /**
     * Helper method to create resources in a threadsafe manner.
View Full Code Here

                }
            }
   
            return program;
        } finally {
            source.recycle();
        }
    }

    private final void addCompiledComponent(ComponentManager newManager,
                                            String normalizedName,
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

                }
            }

            return programInstance;
        } finally {
            source.recycle();
        }
    }

    /**
     * Helper method to create resources in a threadsafe manner.
View Full Code Here

                }
            }

            return program;
        } finally {
            source.recycle();
        }
    }

    private final void addCompiledComponent(ComponentManager newManager,
                                            String normalizedName,
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();
               if (sourceHandler != null) manager.release((Component) sourceHandler);
            }
        }

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

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.