Package org.apache.avalon.framework.component

Examples of org.apache.avalon.framework.component.ComponentSelector.release()


        // Release transformers
        int size = this.transformerSelectors.size();
        for (int i = 0; i < size; i++) {
            final ComponentSelector selector =
                (ComponentSelector)this.transformerSelectors.get(i);
            selector.release( (Component)this.transformers.get(i) );
            this.newManager.release( selector );
        }
        this.transformerSelectors.clear();
        this.transformers.clear();
        this.transformerParams.clear();
View Full Code Here


               
                if (type != null && inputSelector.hasComponent(type))
                    module = (InputModule) inputSelector.select(type);
               
                if (!(module instanceof ThreadSafe) ) {
                    inputSelector.release(module);
                    module = null;
                }
            }
            if (type != null && module == null)
                if (getLogger().isWarnEnabled())
View Full Code Here

            try {
                // FIXME: Is it OK to release a module when we have released the selector before?
                if (inputSelector == null)
                    inputSelector=(ComponentSelector) this.manager.lookup(INPUT_MODULE_SELECTOR);
               
                inputSelector.release(module);
                module = null;
               
            } catch (ComponentException ce) {
                if (getLogger().isWarnEnabled())
                    getLogger().warn("Could not obtain selector for InputModules: "+ce.getMessage());
View Full Code Here

            if (getLogger().isDebugEnabled())
                getLogger().debug("using "+name+" as "+input+" for "+op+" ("+attr+") and "+conf+" gives "+value);
           
        } finally {        
            if (release)
                cs.release(input);

            if (this.inputSelector == null)
                this.manager.release(cs);
        }
View Full Code Here

        } finally {
            // release components
            if (getLogger().isDebugEnabled()) getLogger().debug("releasing components");
            if (outputSelector != null) {
                if (output != null)
                    outputSelector.release(output);
                this.manager.release(outputSelector);
            }
            if (inputSelector != null) {
                if (input != null)
                    inputSelector.release(input);
View Full Code Here

        } catch (ComponentException ce) {
            getLogger().error("Could not retrieve matcher", ce);
            fail("Could not retrieve matcher: " + ce.toString());
        } finally {
            if (matcher != null) {
                selector.release(matcher);
            }
            this.manager.release(selector);
            this.manager.release(resolver);
        }
        return result;
View Full Code Here

        } catch (ComponentException ce) {
            getLogger().error("Could not retrieve action", ce);
            fail("Could not retrieve action: " + ce.toString());
        } finally {
            if (action != null) {
                selector.release(action);
            }
            this.manager.release(selector);
            this.manager.release(resolver);
        }
        return result;
View Full Code Here

        } catch (ComponentException ce) {
            getLogger().error("Could not retrieve generator", ce);
            fail("Could not retrieve generator: " + ce.toString());
        } finally {
            if (generator != null) {
                selector.release(generator);
            }
            this.manager.release(selector);
            this.manager.release(resolver);
            this.manager.release((Component) parser);
        }
View Full Code Here

            getLogger().error("Could not retrieve transformer", ce);
            ce.printStackTrace();
            fail("Could not retrieve transformer:"+ce.toString());
        } finally {
            if (transformer!=null)
                selector.release(transformer);

            if (selector!=null)
                this.manager.release(selector);

            if (inputsource!=null)
View Full Code Here

        } catch (ComponentException ce) {
            getLogger().error("Could not retrieve serializer", ce);
            fail("Could not retrieve serializer:"+ce.toString());
        } finally {
            if (serializer!=null) {
                selector.release(serializer);
            }

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