EMMA Coverage Report (generated Sun Sep 18 11:34:27 PHT 2011)
[all classes][org.apache.continuum.web.startup]

COVERAGE SUMMARY FOR SOURCE FILE [ContinuumStartup.java]

nameclass, %method, %block, %line, %
ContinuumStartup.java0%   (0/1)0%   (0/3)0%   (0/68)0%   (0/13)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ContinuumStartup0%   (0/1)0%   (0/3)0%   (0/68)0%   (0/13)
ContinuumStartup (): void 0%   (0/1)0%   (0/8)0%   (0/2)
contextDestroyed (ServletContextEvent): void 0%   (0/1)0%   (0/1)0%   (0/1)
contextInitialized (ServletContextEvent): void 0%   (0/1)0%   (0/59)0%   (0/10)

1package org.apache.continuum.web.startup;
2 
3/*
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements.  See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership.  The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License.  You may obtain a copy of the License at
11 *
12 *   http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied.  See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 */
21 
22import javax.servlet.ServletContextEvent;
23import javax.servlet.ServletContextListener;
24 
25import org.apache.continuum.buildmanager.BuildsManager;
26import org.apache.continuum.builder.distributed.manager.DistributedBuildManager;
27import org.apache.maven.continuum.Continuum;
28import org.codehaus.plexus.spring.PlexusToSpringUtils;
29import org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor;
30import org.slf4j.Logger;
31import org.slf4j.LoggerFactory;
32import org.springframework.web.context.WebApplicationContext;
33import org.springframework.web.context.support.WebApplicationContextUtils;
34 
35/**
36 * @author <a href="mailto:olamy@apache.org">olamy</a>
37 * @since 15 mars 2008
38 * @version $Id: ContinuumStartup.java 775693 2009-05-17 16:14:22Z ctan $
39 */
40public class ContinuumStartup
41    implements ServletContextListener
42{
43 
44    private Logger log = LoggerFactory.getLogger( getClass() );
45    
46    /** 
47     * @see javax.servlet.ServletContextListener#contextDestroyed(javax.servlet.ServletContextEvent)
48     */
49    public void contextDestroyed( ServletContextEvent sce )
50    {
51        // nothing to do here
52 
53    }
54 
55    /** 
56     * @see javax.servlet.ServletContextListener#contextInitialized(javax.servlet.ServletContextEvent)
57     */
58    public void contextInitialized( ServletContextEvent sce )
59    {
60        WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext( sce
61            .getServletContext() );
62 
63        // to simulate Plexus load on start with Spring
64        Continuum continuum = (Continuum) wac.getBean( PlexusToSpringUtils.buildSpringId( Continuum.class ) );
65 
66        BuildsManager buildsManager = (BuildsManager) wac.getBean( PlexusToSpringUtils.buildSpringId( BuildsManager.class, "parallel" ) );
67 
68        TaskQueueExecutor prepareRelease = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils
69            .buildSpringId( TaskQueueExecutor.class, "prepare-release" ) );
70 
71        TaskQueueExecutor performRelease = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils
72            .buildSpringId( TaskQueueExecutor.class, "perform-release" ) );
73 
74        TaskQueueExecutor rollbackRelease = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils
75            .buildSpringId( TaskQueueExecutor.class, "rollback-release" ) );        
76        
77        TaskQueueExecutor purge = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils
78            .buildSpringId( TaskQueueExecutor.class, "purge" ) );
79 
80        TaskQueueExecutor prepareBuildProject = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils
81            .buildSpringId( TaskQueueExecutor.class, "prepare-build-project" ) );
82 
83        DistributedBuildManager distributedBuildManager = (DistributedBuildManager) wac.getBean( PlexusToSpringUtils
84            .buildSpringId( DistributedBuildManager.class ) );
85    }
86}

[all classes][org.apache.continuum.web.startup]
EMMA 2.0.5312 (C) Vladimir Roubtsov