Package org.apache.avalon.framework.service

Examples of org.apache.avalon.framework.service.ServiceManager.release()


                throw new CascadingIOException("Unable to get components for serializing.", ce);
            } finally {
                if ( serializer != null ) {
                    serializerSelector.release(serializer);
                }
                sitemapManager.release(serializerSelector);
            }
        } catch (ContextException ce) {
            throw new CascadingIOException("Unable to get service manager.", ce);
        }
  }
View Full Code Here


                    xpointerContext.getLogger().debug("XPointer: expression \"" + expression + "\" gave no results.");
                return false;
            }
        } finally {
            if (xpathProcessor != null)
                manager.release(xpathProcessor);
        }
    }
}
View Full Code Here

                                throw new BindingException("XPath expression \"" + xpath + "\" didn't return a result.");
                            if (!(node instanceof Element))
                                throw new BindingException("XPath expression \"" + xpath + "\" did not return an element node.");
                            element = (Element)node;
                        } finally {
                            manager.release(xpathProcessor);
                        }
                    }
                    domTemplate = document.createDocumentFragment();
                    domTemplate.appendChild(element);
                } finally {
View Full Code Here

                    domTemplate = document.createDocumentFragment();
                    domTemplate.appendChild(element);
                } finally {
                    if (source != null)
                        sourceResolver.release(source);
                    manager.release(sourceResolver);
                }
            } else {
                domTemplate = bindingElm.getOwnerDocument().createDocumentFragment();
                NodeList nested = bindingElm.getChildNodes();
                int size = nested.getLength();
View Full Code Here

                    if (accessController != null) {
                        acResolver.release(accessController);
                    }
                    selector.release(acResolver);
                }
                manager.release(selector);
            }
        }

    }
View Full Code Here

                           "Application '" + appName + "' not found."
                       );
        }
        // to avoid messy release stuff later on, we just release the app now
        // as an application is thread safe this isn't really a problem
        current.release(o);
        return (Application)o;
    }

    /**
     * @see org.apache.cocoon.auth.ApplicationManager#isLoggedIn(java.lang.String)
View Full Code Here

                                throw new BindingException("XPath expression '" + xpath + "' did not return an element node.",
                                                           DomHelper.getLocationObject(bindingElm));
                            }
                            element = (Element) node;
                        } finally {
                            manager.release(xpathProcessor);
                        }
                    }
                    domTemplate = document.createDocumentFragment();
                    domTemplate.appendChild(element);
                } finally {
View Full Code Here

                    domTemplate.appendChild(element);
                } finally {
                    if (source != null) {
                        sourceResolver.release(source);
                    }
                    manager.release(sourceResolver);
                }
            } else if (bindingElm.hasChildNodes()) {
                // FIXME: using the binding's document prevents it to be garbage collected.
                //        --> create a new Document and use doc.importNode();
                domTemplate = bindingElm.getOwnerDocument().createDocumentFragment();
View Full Code Here

                        InputSource source = new InputSource(new ByteArrayInputStream(val.toString().getBytes()));
                        IncludeXMLConsumer includeConsumer = new IncludeXMLConsumer(consumer);
                        includeConsumer.setIgnoreRootElement(stripRoot);
                        parser.parse(source, includeConsumer);
                    } finally {
                        serviceManager.release(parser);
                    }
                }
            } else
                Invoker.executeNode(consumer, val, stripRoot);
        } catch (Exception e) {
View Full Code Here

            }
            source = factory.getSource(systemID, parameters);
        } catch (final ProcessingException ce) {
            // no selector available, use fallback
        } finally {
            m.release(factory);
        }

        if (null == source) {
            try {
                factory = this.getSourceFactory(m, "*");
 
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.