Package org.apache.avalon.framework.component

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


                                resolver,
                                this.environment.getObjectModel(),
                                source,
                                jsobjectToParameters(parameters));
        } finally {
            actionSelector.release(action);
        }

        // what should be done with the redirector ??
        // ignore it or call sendPage with it?
        return (result!=null? new ScriptableMap(result) : null);
View Full Code Here


        Object result = null;
        try {
            result = input.getAttribute(attribute, null,
                                        this.environment.getObjectModel());
        } finally {
            inputSelector.release(input);
        }
        return result;
    }

    public void jsFunction_outputModuleSetAttribute(String type, String attribute,
View Full Code Here

        try {
            output.setAttribute(null, this.environment.getObjectModel(), attribute,
                                jsobjectToObject(value));
        }
        finally {
            outputSelector.release(output);
        }
    }

    public void jsFunction_outputModuleCommit(String type)
        throws Exception
View Full Code Here

            .lookup(OutputModule.ROLE + "Selector");
        OutputModule output = (OutputModule) outputSelector.select(type);
        try {
            output.commit(null, this.environment.getObjectModel());
        } finally {
            outputSelector.release(output);
        }
    }

    public void jsFunction_outputModuleRollback(String type)
        throws Exception
View Full Code Here

            .lookup(OutputModule.ROLE + "Selector");
        OutputModule output = (OutputModule) outputSelector.select(type);
        try {
            output.rollback(null, this.environment.getObjectModel(), null);
        } finally {
            outputSelector.release(output);
        }
    }
}
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

               
                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

        } catch (Exception e) {
            if (getLogger().isWarnEnabled())
                getLogger().warn("A problem obtaining a value from "+name+" occurred : "+e.getMessage());
        } 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.