Package org.apache.avalon.framework.component

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


        } catch (Exception e) {
            getLogger().error("Could not execute test", e);
            fail("Could not execute test: " + e);
        } 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 execute test", pe);
            pe.printStackTrace();
            fail("Could not execute test:"+pe.toString());
        } finally {
            if (transformer!=null)
                selector.release(transformer);

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

            if (inputsource!=null)
View Full Code Here

                        getLogger().error(x.getMessage(), x);
                    }
                    finally {
                        this.web3source.releaseWeb3Client( this.connection );
                        if ( null != streamerSelector ) {
                            streamerSelector.release( w3s );
                        }
                        manager.release( streamerSelector );
                    }
                    this.connection = null;
                    this.repository = null;
View Full Code Here

            contentHandler.endDocument();
        } catch (ComponentException ce) {
            throw new SAXException("Unable to lookup profile manager.", ce);
        } finally {
            if ( null != portalLayoutRenderer) {
                rendererSelector.release(portalLayoutRenderer);
            }
            this.componentManager.release(rendererSelector);
            if (null != profileManager) {
                this.componentManager.release(profileManager);
            }
View Full Code Here

                              oStream.close();
                          } catch (Exception ignore) {
                            }
                        }
            if ( selector != null ) {
              selector.release( serializer );
              manager.release( selector );
            }
                  }
                } else {
                  final String content = XMLUtils.serializeNode(frag,
View Full Code Here

                                oStream.close();
                            } catch (Exception ignore) {
                            }
                        }
            if ( selector != null ) {
              selector.release( serializer );
              manager.release( selector );
            }
                    }
          content = oStream.toString();
        } else {
View Full Code Here

        // 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

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.