Examples of SarMetaData


Examples of org.apache.avalon.phoenix.metadata.SarMetaData

        if( PHASE_STARTUP == name )
        {
            //... for startup, so indicate to applicable listeners
            final PartitionProfile partition = m_context.getPartitionProfile();
            final File homeDirectory = m_context.getHomeDirectory();
            final SarMetaData sarMetaData =
                ComponentMetaDataConverter.toSarMetaData( partition,
                                                          homeDirectory );
            m_listenerSupport.fireApplicationStartingEvent( sarMetaData );
        }
        else
View Full Code Here

Examples of org.apache.avalon.phoenix.metadata.SarMetaData

            partition.getPartition( ContainerConstants.LISTENER_PARTITION );
        final BlockListenerMetaData[] listeners =
            toBlockListeners( listenerPartition.getMetaData().getComponents() );
        final BlockMetaData[] blocks =
            toBlocks( blockPartition.getComponents() );
        return new SarMetaData( partition.getMetaData().getName(),
                                homeDirectory,
                                blocks,
                                listeners );
    }
View Full Code Here

Examples of org.apache.avalon.phoenix.metadata.SarMetaData

    private LoggerStore createHierarchy( final int index )
        throws Exception
    {
        final Configuration logs = loadConfig( "config" + index + ".xml" );
        final LogManager logManager = createLogManager();
        final SarMetaData sarMetaData =
            new SarMetaData( "test",
                             m_baseDirectory,
                             new BlockMetaData[0],
                             new BlockListenerMetaData[0] );
        cleanHomeDirectory( sarMetaData );

        //make sure directory is created else log4j will fail.
        if( 3 == index )
        {
            final File file =
                new File( m_baseDirectory.getAbsolutePath() +
                          File.separator +
                          "logs" );
            file.mkdirs();
        }

        final HashMap context = new HashMap();
        context.put( BlockContext.APP_NAME, sarMetaData.getName() );
        context.put( BlockContext.APP_HOME_DIR,
                     sarMetaData.getHomeDirectory() );
        context.put( "classloader", getClass().getClassLoader() );

        final LoggerStore store =
            logManager.createHierarchy( logs,
                                        sarMetaData.getHomeDirectory(),
                                        sarMetaData.getHomeDirectory(),
                                        context );
        return store;
    }
View Full Code Here

Examples of org.apache.avalon.phoenix.metadata.SarMetaData

        final BlockMetaData[] blocks = buildBlocks( blockConfig, classLoader );

        final Configuration[] listenerConfig = assembly.getChildren( "listener" );
        final BlockListenerMetaData[] listeners = buildBlockListeners( listenerConfig );

        return new SarMetaData( name, directory, blocks, listeners );
    }
View Full Code Here

Examples of org.apache.avalon.phoenix.metadata.SarMetaData

    }

    public Object get( Object key )
        throws ContextException
    {
        final SarMetaData metaData = m_applicationContext.getMetaData();
        if( BlockContext.APP_NAME.equals( key ) )
        {
            return metaData.getName();
        }
        else if( BlockContext.APP_HOME_DIR.equals( key ) )
        {
            return metaData.getHomeDirectory();
        }
        else if( BlockContext.NAME.equals( key ) )
        {
            return m_name;
        }
View Full Code Here

Examples of org.apache.avalon.phoenix.metadata.SarMetaData

    }

    private ApplicationContext createApplicationContext( final SarEntry entry )
        throws Exception
    {
        final SarMetaData metaData = entry.getMetaData();
        final String name = metaData.getName();

        final DefaultApplicationContext context =
            new DefaultApplicationContext( metaData,
                                           entry.getClassLoader(),
                                           entry.getLogger() );
View Full Code Here

Examples of org.apache.avalon.phoenix.metadata.SarMetaData

                                                        installation.getSource(),
                                                        installation.getDirectory(),
                                                        installation.getWorkDirectory(),
                                                        installation.getClassPath() );
            //assemble all the blocks for application
            final SarMetaData metaData =
                m_assembler.assembleSar( name, assembly, directory, classLoader );

            storeConfigurationSchemas( metaData, classLoader );

            verify( metaData, classLoader );

            //Setup configuration for all the applications blocks
            setupConfiguration( metaData, config.getChildren() );

            final Configuration logs = environment.getChild( "logs" );
            final Logger logger =
                m_logManager.createHierarchy( metaData, logs, classLoader );

            //Finally add application to kernel
            m_kernel.addApplication( metaData, classLoader, logger, environment );

            m_installations.put( metaData.getName(), installation );

            final String message =
                REZ.getString( "deploy.notice.sar.add",
                               metaData.getName(),
                               Arrays.asList( installation.getClassPath() ) );
            getLogger().debug( message );
            success = true;
        }
        catch( final DeploymentException de )
View Full Code Here

Examples of org.apache.avalon.phoenix.metadata.SarMetaData

    }

    public Object get( Object key )
        throws ContextException
    {
        final SarMetaData metaData = m_applicationContext.getMetaData();
        if( BlockContext.APP_NAME.equals( key ) )
        {
            return metaData.getName();
        }
        else if( BlockContext.APP_HOME_DIR.equals( key ) )
        {
            return metaData.getHomeDirectory();
        }
        else if( BlockContext.NAME.equals( key ) )
        {
            return m_name;
        }
View Full Code Here

Examples of org.apache.avalon.phoenix.metadata.SarMetaData

                                                        installation.getSource(),
                                                        installation.getDirectory(),
                                                        installation.getWorkDirectory(),
                                                        installation.getClassPath() );
            //assemble all the blocks for application
            final SarMetaData metaData =
                m_assembler.assembleSar( name, assembly, directory, classLoader );

            storeConfigurationSchemas( metaData, classLoader );

            verify( metaData, classLoader );

            //Setup configuration for all the applications blocks
            setupConfiguration( metaData, config.getChildren() );

            final Configuration logs = environment.getChild( "logs" );
            final Logger logger =
                m_logManager.createHierarchy( metaData, logs, classLoader );

            //Finally add application to kernel
            m_kernel.addApplication( metaData,
                                     installation.getWorkDirectory(),
                                     classLoader,
                                     logger,
                                     environment );

            m_installations.put( metaData.getName(), installation );

            final String message =
                REZ.getString( "deploy.notice.sar.add",
                               metaData.getName(),
                               Arrays.asList( installation.getClassPath() ) );
            getLogger().debug( message );
            success = true;
        }
        catch( final DeploymentException de )
View Full Code Here

Examples of org.apache.avalon.phoenix.metadata.SarMetaData

    }

    private ApplicationContext createApplicationContext( final SarEntry entry )
        throws Exception
    {
        final SarMetaData metaData = entry.getMetaData();
        final String name = metaData.getName();

        final DefaultApplicationContext context =
            new DefaultApplicationContext( metaData,
                                           entry.getWorkDirectory(),
                                           entry.getClassLoader(),
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.