/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package org.apache.webbeans.lifecycle;

import java.util.Properties;

import org.apache.webbeans.config.WebBeansFinder;
import org.apache.webbeans.context.ContextFactory;
import org.apache.webbeans.logger.WebBeansLogger;

/**
 * Default LifeCycle for a standalone application without a ServletContainer.
 */
public class StandaloneLifeCycle extends AbstractLifeCycle
{
    private static final WebBeansLogger logger = WebBeansLogger.getLogger(StandaloneLifeCycle.class);
        
    public StandaloneLifeCycle()
    {
        super(null, logger);        
    }
    
    @Override
    public void beforeInitApplication(Properties properties)
    {
        WebBeansFinder.clearInstances();
    }
    
    @Override
    public void beforeStartApplication(Object object)
    {
        ContextFactory.initRequestContext(null);
        ContextFactory.initSessionContext(null);
        ContextFactory.initConversationContext(null);
        ContextFactory.initApplicationContext(null);       
        ContextFactory.initSingletonContext(null);
    }
        
    
    @Override
    public void beforeStopApplication(Object endObject)
    {
        ContextFactory.destroyRequestContext(null);
        ContextFactory.destroySessionContext(null);
        ContextFactory.destroyConversationContext();
        ContextFactory.destroyApplicationContext(null);
        ContextFactory.destroySingletonContext(null);
    }
    
}
@@ -1310,29 +1310,165 @@
 cle(
-)%0A    %7B%0A        super
+Properties properties, WebBeansLogger logger)%0A    %7B%0A        super(properties, logger);        %0A    %7D%0A    %0A    public StandaloneLifeCycle()%0A    %7B%0A        this
 (nul

Allow subclasses of StandaloneLifeCycle to pass their logger in the constructor