Examples of ExcaliburComponentManager


Examples of org.apache.avalon.excalibur.component.ExcaliburComponentManager

            this.getLogger().debug("Parser: " + parser);
            this.getLogger().debug("Classpath: " + this.classpath);
            this.getLogger().debug("Work directory: " + this.workDir.getCanonicalPath());
        }

        ExcaliburComponentManager startupManager = new ExcaliburComponentManager((ClassLoader) this.context.get(Constants.CONTEXT_CLASS_LOADER));
        ContainerUtil.enableLogging(startupManager, this.rootLogger.getChildLogger("startup"));
        ContainerUtil.contextualize(startupManager, this.context);
        startupManager.setLoggerManager(this.loggerManager);

        try {
            startupManager.addComponent(SAXParser.ROLE,
                                        ClassUtils.loadClass(parser),
                                        new DefaultConfiguration("", "empty"));
        } catch (Exception e) {
            throw new ConfigurationException("Could not load parser " + parser, e);
        }
View Full Code Here

Examples of org.apache.avalon.excalibur.component.ExcaliburComponentManager

        roleManager.setLogger( logKitManager.getLogger( rmLoggerName ) );
        roleManager.configure( confRM );

        // Set up the ComponentLocator
        String cmLoggerName = confCM.getAttribute( "logger", "cm" );
        ExcaliburComponentManager ecManager = new ExcaliburComponentManager();
        ecManager.setLogger( logKitManager.getLogger( cmLoggerName ) );
        ecManager.setLogKitManager( logKitManager );
        ecManager.contextualize( context );
        ecManager.setRoleManager( roleManager );
        ecManager.configure( confCM );
        ecManager.initialize();
        m_manager = ecManager;
    }
View Full Code Here

Examples of org.apache.avalon.excalibur.component.ExcaliburComponentManager

        DefaultRoleManager roleManager = new DefaultRoleManager();
        roleManager.enableLogging(getLogger());
        roleManager.configure(confRM);

        // Set up the ComponentLocator
        ExcaliburComponentManager ecManager = new ExcaliburComponentManager();
        ecManager.enableLogging(getLogger());
        ecManager.contextualize(context);
        ecManager.setRoleManager(roleManager);
        ecManager.setLoggerManager(new DefaultLoggerManager(getLogger()));
        ecManager.configure(confCM);
        ecManager.initialize();
        this.manager = new WrapperServiceManager(ecManager);
    }
View Full Code Here

Examples of org.apache.avalon.excalibur.component.ExcaliburComponentManager

            getLogger().debug("Using parser: " + parser);
            getLogger().debug("Classpath = " + classpath);
            getLogger().debug("Work directory = " + workDir.getCanonicalPath());
        }

        ExcaliburComponentManager startupManager = new ExcaliburComponentManager((ClassLoader)this.context.get(Constants.CONTEXT_CLASS_LOADER));
        ContainerUtil.enableLogging(startupManager, getLogger().getChildLogger("startup"));
        ContainerUtil.contextualize(startupManager, this.context);
        startupManager.setLoggerManager(this.loggerManager);

        try {
            startupManager.addComponent(SAXParser.ROLE, ClassUtils.loadClass(parser), new DefaultConfiguration("", "empty"));
        } catch (Exception e) {
            throw new ConfigurationException("Could not load parser " + parser, e);
        }
       
        ContainerUtil.initialize(startupManager);
View Full Code Here

Examples of org.apache.avalon.excalibur.component.ExcaliburComponentManager

            getLogger().debug("Using parser: " + parser);
            getLogger().debug("Classpath = " + classpath);
            getLogger().debug("Work directory = " + workDir.getCanonicalPath());
        }

        ExcaliburComponentManager startupManager = new ExcaliburComponentManager((ClassLoader)this.context.get(Constants.CONTEXT_CLASS_LOADER));
        ContainerUtil.enableLogging(startupManager, getLogger().getChildLogger("startup"));
        ContainerUtil.contextualize(startupManager, this.context);
        startupManager.setLogKitManager(this.logKitManager);

        try {
            startupManager.addComponent(SAXParser.ROLE, ClassUtils.loadClass(parser), new org.apache.avalon.framework.configuration.DefaultConfiguration("", "empty"));
        } catch (Exception e) {
            throw new ConfigurationException("Could not load parser " + parser, e);
        }

        ContainerUtil.initialize(startupManager);
View Full Code Here

Examples of org.apache.avalon.excalibur.component.ExcaliburComponentManager

    public void setUp() throws Exception
    {
        m_disposals = 0;

        m_manager = new ExcaliburComponentManager();

        final String pattern =
            ( "%5.5{priority} [%40.40{category}]: %{message}\n%{throwable}" );

        org.apache.log.Logger logger = Hierarchy.getDefaultHierarchy().getLoggerFor( getName() );
View Full Code Here

Examples of org.apache.avalon.excalibur.component.ExcaliburComponentManager

        if (config == null) {
            getLogger().debug("Sitemap has no components definition at " + tree.getLocation());
            config = new DefaultConfiguration("", "");
        }
       
        ComponentManager manager = new ExcaliburComponentManager(this.parentManager) {
            public void setRoleManager(RoleManager rm) {
                super.setRoleManager(rm);
            }
        };
       
        LifecycleHelper.setupComponent(manager,
            getLogger(),
            this.context,
            this.parentManager,
            this.roleManager,
            this.logKit,
            config
        );
       
        // Set parent of all selectors.
        if (this.parentManager != null) {
           
            for (int i = 0; i < ComponentsSelector.SELECTOR_ROLES.length; i++) {
               
                String role = ComponentsSelector.SELECTOR_ROLES[i];
               
                ComponentSelector parentSelector = null;
                try {
                    parentSelector = (ComponentSelector)this.parentManager.lookup(role);
                } catch(Exception e) {
                    // ignore and keep it null
                }
               
                if (parentSelector != null) {
               
                    ExtendedComponentSelector localSelector = null;
                    try {
                        localSelector = (ExtendedComponentSelector)manager.lookup(role);
                       
                        if (localSelector != parentSelector) {
                            // local selector wasn't given by chaining to the parent manager
                            localSelector.setParentSelector(parentSelector);
                        }
                        manager.release(localSelector);

                    } catch(Exception e) {
                        // ignore
                    }
                   
View Full Code Here

Examples of org.apache.avalon.excalibur.component.ExcaliburComponentManager

    public ParentComponentManager(final String jndiName) {
        this.jndiName = jndiName;

        // Initialize it here so we can let it be final.
        this.delegate = new ExcaliburComponentManager();
    }
View Full Code Here

Examples of org.apache.avalon.excalibur.component.ExcaliburComponentManager

            getLogger().debug("Using parser: " + parser);
            getLogger().debug("Classpath = " + classpath);
            getLogger().debug("Work directory = " + workDir.getCanonicalPath());
        }

        ExcaliburComponentManager startupManager = new ExcaliburComponentManager((ClassLoader)this.context.get(Constants.CONTEXT_CLASS_LOADER));
        ContainerUtil.enableLogging(startupManager, getLogger().getChildLogger("startup"));
        ContainerUtil.contextualize(startupManager, this.context);
        startupManager.setLogKitManager(this.logKitManager);

        try {
            startupManager.addComponent(SAXParser.ROLE, ClassUtils.loadClass(parser), new org.apache.avalon.framework.configuration.DefaultConfiguration("", "empty"));
        } catch (Exception e) {
            throw new ConfigurationException("Could not load parser " + parser, e);
        }

        ContainerUtil.initialize(startupManager);
View Full Code Here

Examples of org.apache.avalon.excalibur.component.ExcaliburComponentManager

        roleManager.setLogger( logKitManager.getLogger( rmLoggerName ) );
        roleManager.configure( confRM );

        // Set up the ComponentLocator
        String cmLoggerName = confCM.getAttribute( "logger", "cm" );
        ExcaliburComponentManager ecManager = new ExcaliburComponentManager();
        ecManager.setLogger( logKitManager.getLogger( cmLoggerName ) );
        ecManager.setLogKitManager( logKitManager );
        ecManager.contextualize( context );
        ecManager.setRoleManager( roleManager );
        ecManager.configure( confCM );
        ecManager.initialize();
        m_manager = ecManager;
    }
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.