Package org.apache.cocoon.environment

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


            }
            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)
  {
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

            if (programInstance instanceof Recomposable) {
                ((Recomposable)programInstance).recompose(newManager);
            }
            return programInstance;
        } finally {
            source.recycle();
            this.markupSelector.release(markupLanguage);
            this.languageSelector.release(programmingLanguage);
        }
    }
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

            throw new RuntimeException(e.getMessage());
        } finally {
            if ( stream != null )
                try {stream.close();} catch (Exception ase) {  throw new RuntimeException(ase.getMessage()); }
            if ( resource != null )
                resource.recycle();
        }
        return result.toString();
    }

View Full Code Here

            source.toSAX(new org.apache.cocoon.xml.IncludeXMLConsumer(contentHandler));
          } catch (Exception e) {
              throw new RuntimeException("Error including source "+base+" "+uri+":"+e.getMessage());
          } finally {
              if (source != null)
                 source.recycle();
          }
    }
   
    public static void includeString(String string, ComponentManager manager, ContentHandler contentHandler)
        throws RuntimeException {
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

            if (input != null) {
                input.toSAX(filter);
            }
        } finally {
            if (input != null) input.recycle();
            input = null;
        }

        builder.endElement("", "sunShine", "sunShine");
        builder.endDocument();
View Full Code Here

                child.normalize();
                root.removeChild(child);
                frag.appendChild(child);
            }
        } finally {
            if (input != null) input.recycle();
            input = null;
        }


        if (this.getLogger().isDebugEnabled() == true) {
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.