Package org.apache.avalon.framework.service

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


                    xpointerContext.getLogger().debug("XPointer: expression \"" + expression + "\" gave no results.");
                return false;
            }
        } finally {
            if (xpathProcessor != null)
                manager.release(xpathProcessor);
        }
    }
}
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

                        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

                                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

                           "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

            }
        }
        finally
        {
            // Release the component
            serviceManager.release( instrumentable );
            instrumentable = null;

            // Dispose of the ComponentManagerCreator.  It will dispose all
            //  of its own components, including the ComponentManager
            m_componentManagerCreator.dispose();
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

            }
        } finally {
            data.put(DATA_MAP_KEY_ISRUNNING, new Boolean(false));

            if (null != manager) {
                manager.release(job);
            }
        }
    }
}
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.