Package org.apache.avalon.phoenix.components.deployer.installer

Examples of org.apache.avalon.phoenix.components.deployer.installer.Installation


     * @throws DeploymentException if an error occurs
     */
    public void undeploy( final String name )
        throws DeploymentException
    {
        final Installation installation =
            (Installation)m_installations.remove( name );
        if( null == installation )
        {
            final String message =
                REZ.getString( "deploy.no-deployment.error", name );
View Full Code Here


                REZ.getString( "deploy.already-deployed.error",
                               name );
            throw new DeploymentException( message );
        }

        Installation installation = null;
        boolean success = false;
        try
        {
            //m_baseWorkDirectory
            installation = m_installer.install( name, location );

            final Configuration config = getConfigurationFor( installation.getConfig() );
            final Configuration environment = getConfigurationFor( installation.getEnvironment() );
            final Configuration assembly = getConfigurationFor( installation.getAssembly() );

            final File directory = installation.getDirectory();

            final ClassLoader classLoader =
                m_classLoaderManager.createClassLoader( environment,
                                                        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

     * @throws DeploymentException if an error occurs
     */
    public void redeploy( final String name )
        throws DeploymentException
    {
        final Installation installation =
            (Installation)m_installations.get( name );
        if( null == installation )
        {
            final String message =
                REZ.getString( "deploy.no-deployment.error", name );
            throw new DeploymentException( message );
        }
        try
        {
            final URL location = installation.getSource().toURL();
            undeploy( name );
            deploy( name, location );
        }
        catch( final Exception e )
        {
View Full Code Here

     * @throws DeploymentException if an error occurs
     */
    public void undeploy( final String name )
        throws DeploymentException
    {
        final Installation installation =
            (Installation)m_installations.remove( name );
        if( null == installation )
        {
            final String message =
                REZ.getString( "deploy.no-deployment.error", name );
View Full Code Here

         * so that reloaded applications will have their i18n bundles
         * reloaded.
         */
        ResourceManager.clearResourceCache();

        Installation installation = null;
        boolean success = false;
        try
        {
            //m_baseWorkDirectory
            installation = m_installer.install( name, location );

            final Configuration config = getConfigurationFor( installation.getConfig() );
            final Configuration environment = getConfigurationFor( installation.getEnvironment() );
            final Configuration assembly = getConfigurationFor( installation.getAssembly() );

            final File directory = installation.getDirectory();

            final ClassLoader classLoader =
                m_classLoaderManager.createClassLoader( environment,
                                                        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

     * @throws DeploymentException if an error occurs
     */
    public void undeploy( final String name )
        throws DeploymentException
    {
        final Installation installation =
            (Installation)m_installations.remove( name );
        if( null == installation )
        {
            final String message =
                REZ.getString( "deploy.no-deployment.error", name );
View Full Code Here

                REZ.getString( "deploy.already-deployed.error",
                               name );
            throw new DeploymentException( message );
        }

        Installation installation = null;
        boolean success = false;
        try
        {
            //m_baseWorkDirectory
            installation = m_installer.install( name, location );

            final Configuration config = getConfigurationFor( installation.getConfig() );
            final Configuration environment = getConfigurationFor( installation.getEnvironment() );
            final Configuration assembly = getConfigurationFor( installation.getAssembly() );

            final File directory = installation.getDirectory();

            final ClassLoader classLoader =
                m_classLoaderManager.createClassLoader( environment,
                                                        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

     * @throws DeploymentException if an error occurs
     */
    public void redeploy( final String name )
        throws DeploymentException
    {
        final Installation installation =
            (Installation)m_installations.get( name );
        if( null == installation )
        {
            final String message =
                REZ.getString( "deploy.no-deployment.error", name );
            throw new DeploymentException( message );
        }
        try
        {
            final URL location = installation.getSource().toURL();
            undeploy( name );
            deploy( name, location );
        }
        catch( final Exception e )
        {
View Full Code Here

     * @throws DeploymentException if an error occurs
     */
    public void undeploy( final String name )
        throws DeploymentException
    {
        final Installation installation =
            (Installation)m_installations.remove( name );
        if( null == installation )
        {
            final String message =
                REZ.getString( "deploy.no-deployment.error", name );
View Full Code Here

         * so that reloaded applications will have their i18n bundles
         * reloaded.
         */
        ResourceManager.clearResourceCache();

        Installation installation = null;
        boolean success = false;
        try
        {
            //m_baseWorkDirectory
            installation = m_installer.install( name, location );

            final Configuration config = getConfigurationFor( installation.getConfig() );
            final Configuration environment = getConfigurationFor( installation.getEnvironment() );
            final Configuration assembly = getConfigurationFor( installation.getAssembly() );

            final File directory = installation.getDirectory();

            final ClassLoader classLoader =
                m_classLoaderManager.createClassLoader( environment,
                                                        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

TOP

Related Classes of org.apache.avalon.phoenix.components.deployer.installer.Installation

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.