Package org.apache.avalon.fortress.impl

Examples of org.apache.avalon.fortress.impl.DefaultContainerManager


       
        config.setLoggerManagerConfiguration( conf.getChild( "logger" ) );
        config.setRoleManagerConfiguration( conf.getChild( "roles" ) );
        config.setContainerConfiguration( conf.getChild( "components" ) );
       
        m_containerManager = new DefaultContainerManager(
            setupContext( conf.getChild( "context", true ), config.getContext() ) );
        ContainerUtil.initialize( m_containerManager );
       
        m_container = (DefaultContainer) m_containerManager.getContainer();
        m_serviceManager = m_container.getServiceManager();
View Full Code Here


            config.setContextDirectory( getServletContext().getRealPath("/") );
            config.setWorkDirectory( (File) getServletContext().getAttribute( "javax.servlet.context.tempdir" ) );
            config.setContainerConfiguration( "resource://org/apache/avalon/fortress/examples/servlet/ServletContainer.xconf" );
            config.setLoggerManagerConfiguration( "resource://org/avalon/excalibur/fortress/examples/servlet/ServletContainer.xlog" );

            m_containerManager = new DefaultContainerManager( config.getContext() );
            ContainerUtil.initialize( m_containerManager );

            m_container = (ServletContainer)m_containerManager.getContainer();
        }
        catch( Exception e )
View Full Code Here

        config.setContainerConfiguration( containerConfig );
        config.setLoggerManagerConfiguration( loggerConfig );
        config.setInstrumentManagerConfiguration( instrumentConfig );

        // Get the root container initialized
        ContainerManager cm = new DefaultContainerManager( config.getContext() );
        ContainerUtil.initialize( cm );

        /* Special containers such as Swing applications run in a different
         * thread in the background.  This is only one method of handling
         * a Swing based container.  Another alternative is to have the root
         * JFrame/JWindow/JDialog at this level, and hand a reference of the
         * container or its ServiceManager to the Swing class.  That will allow
         * you to defer proper shutdown of Fortress resources when your
         * application is closed.
         */
        ( (SwingContainer)cm.getContainer() ).run();

        // Properly clean up when we are done
        ContainerUtil.dispose( cm );
    }
View Full Code Here

            }
        }
       
        Context context = initializeContext( config.getContext() );
       
        m_containerManager = new DefaultContainerManager( config.getContext() );
        ContainerUtil.initialize( m_containerManager );
       
        m_container = (DefaultContainer)m_containerManager.getContainer();
       
        m_serviceManager = m_container.getServiceManager();
View Full Code Here

        config.setContainerClass( ExtendedContainer.class );
        config.setContainerConfiguration( "resource://org/apache/avalon/fortress/examples/extended/ExtendedContainer.xconf" );
        config.setLoggerManagerConfiguration( "resource://org/apache/avalon/fortress/examples/extended/ExtendedContainer.xlog" );
        setupExtensions(config);

        final ContainerManager cm = new DefaultContainerManager( config.getContext() );
        ContainerUtil.initialize( cm );

        m_container = (ExtendedContainer)cm.getContainer();

        m_container.doLookups();

        ContainerUtil.dispose( cm );
    }
View Full Code Here

            config.setContainerClass( ComponentViewer.class );
            config.setContainerConfiguration( "resource://org/apache/avalon/fortress/examples/viewer/ComponentViewer.xconf" );
            config.setLoggerManagerConfiguration( "resource://org/apache/avalon/fortress/examples/viewer/ComponentViewer.xlog" );
            config.setInstrumentManagerConfiguration( "resource://org/apache/avalon/fortress/examples/viewer/ComponentViewer.instruments" );

            cm = new DefaultContainerManager( config.getContext() );
            org.apache.avalon.framework.container.ContainerUtil.initialize( cm );

            ( (ComponentViewer)cm.getContainer() ).run();
        }
        catch( CascadingException e )
View Full Code Here

            }
        }
       
        Context context = initializeContext( config.getContext() );
       
        m_containerManager = new DefaultContainerManager( config.getContext() );
        ContainerUtil.initialize( m_containerManager );
       
        m_container = (DefaultContainer)m_containerManager.getContainer();
       
        m_serviceManager = m_container.getServiceManager();
View Full Code Here

        config.setWorkDirectory( "./" );
        final String BASE = "resource://org/apache/avalon/fortress/test/data/";
        config.setContainerConfiguration( BASE + "test1.xconf" );
        config.setLoggerManagerConfiguration( BASE + "test1.xlog" );

        final ContainerManager cm = new DefaultContainerManager( config.getContext() );
        ContainerUtil.initialize( cm );

        final DefaultContainer container = (DefaultContainer) cm.getContainer();
        final ServiceManager serviceManager = container.getServiceManager();
        return serviceManager;
    }
View Full Code Here

TOP

Related Classes of org.apache.avalon.fortress.impl.DefaultContainerManager

Copyright © 2018 www.massapicom. 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.