myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tandrasc...@apache.org
Subject [myfaces] branch master updated: removed LifecycleProvider SPI, it wasn't used since ManagedBeans were removed
Date Fri, 16 Aug 2019 16:15:02 GMT
This is an automated email from the ASF dual-hosted git repository.

tandraschko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces.git


The following commit(s) were added to refs/heads/master by this push:
     new 8e4497e  removed LifecycleProvider SPI, it wasn't used since ManagedBeans were removed
8e4497e is described below

commit 8e4497e9767706e8e5c073296b4b8b97f1f894bf
Author: Thomas Andraschko <tandraschko@apache.org>
AuthorDate: Fri Aug 16 18:14:53 2019 +0200

    removed LifecycleProvider SPI, it wasn't used since ManagedBeans were removed
---
 impl/pom.xml                                       |   4 +-
 .../annotation/AllAnnotationLifecycleProvider.java |  99 --------
 .../DefaultLifecycleProviderFactory.java           | 263 ---------------------
 .../annotation/DiscoverableLifecycleProvider.java  |  27 ---
 .../config/annotation/LifecycleProvider.java       |  51 ----
 .../config/annotation/LifecycleProvider2.java      |  50 ----
 .../annotation/LifecycleProviderFactory.java       |  89 -------
 .../annotation/NoAnnotationLifecyleProvider.java   |  46 ----
 .../NoInjectionAnnotationLifecycleProvider.java    | 219 -----------------
 .../ResourceAnnotationLifecycleProvider.java       | 248 -------------------
 .../Tomcat7AnnotationLifecycleProvider.java        | 140 -----------
 .../apache/myfaces/spi/ServiceProviderFinder.java  |   2 -
 .../spi/impl/DefaultInjectionProviderFactory.java  |  26 +-
 .../webapp/StartupServletContextListener.java      |   3 -
 ...che.myfaces.config.annotation.LifecycleProvider |   1 -
 .../config/annotation/AnnotatedManagedBean.java    |  72 ------
 .../config/annotation/AnnotatedManagedBean2.java   |  91 -------
 .../annotation/AnnotationProcessorTestCase.java    |  71 ------
 .../MockDiscoverableLifecycleProvider.java         |  45 ----
 .../config/annotation/MockLifecycleProvider.java   |  41 ----
 .../config/annotation/MockLifecycleProvider2.java  |  47 ----
 .../annotation/OwnAnnotationProcessorTestCase.java |  48 ----
 .../myfaces/test/core/AbstractMyFacesTestCase.java |   3 -
 .../test/core/runner/AbstractJsfTestContainer.java |   5 +-
 ...che.myfaces.config.annotation.LifecycleProvider |   1 -
 parent/pom.xml                                     |   2 +-
 parent/src/site/apt/googleappenginesupport.apt     |   9 -
 .../myfaces2-googleappengine-eclipse-tutorial.apt  |  14 --
 .../apt/myfaces2-googleappengine-idea-tutorial.apt |  17 +-
 29 files changed, 18 insertions(+), 1716 deletions(-)

diff --git a/impl/pom.xml b/impl/pom.xml
index a8d5463..402227a 100644
--- a/impl/pom.xml
+++ b/impl/pom.xml
@@ -94,8 +94,6 @@
                         <exclude>src/main/resources/META-INF/licenses/omnifaces-LICENSE.txt</exclude>
 
                         <!-- services files are trivial config files with no comments -->
-                        <exclude>src/test/resources/META-INF/services/org.apache.myfaces.config.annotation.LifecycleProvider</exclude>
-                        <exclude>src/main/resources/META-INF/services/org.apache.myfaces.config.annotation.LifecycleProvider</exclude>
                         <exclude>src/main/resources/META-INF/services/org.apache.myfaces.spi.InjectionProvider</exclude>
                         <exclude>src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension</exclude>
                         <exclude>src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializer</exclude>
@@ -1063,7 +1061,7 @@
             <artifactId>commons-beanutils</artifactId>
         </dependency>
 
-        <!-- tomcat 7 support (LifecycleProvider) -->
+        <!-- tomcat 7 support (InjectionProvider) -->
         <dependency>
             <groupId>org.apache.tomcat</groupId>
             <artifactId>tomcat-catalina</artifactId>
diff --git a/impl/src/main/java/org/apache/myfaces/config/annotation/AllAnnotationLifecycleProvider.java b/impl/src/main/java/org/apache/myfaces/config/annotation/AllAnnotationLifecycleProvider.java
deleted file mode 100644
index 711e1c9..0000000
--- a/impl/src/main/java/org/apache/myfaces/config/annotation/AllAnnotationLifecycleProvider.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * 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.myfaces.config.annotation;
-
-import javax.naming.NamingException;
-import javax.naming.Context;
-import javax.annotation.Resource;
-import javax.ejb.EJB;
-import javax.persistence.PersistenceContext;
-import javax.persistence.PersistenceUnit;
-
-import java.lang.reflect.Method;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Field;
-
-public class AllAnnotationLifecycleProvider extends ResourceAnnotationLifecycleProvider
-{
-
-    public AllAnnotationLifecycleProvider(Context context)
-    {
-        super(context);
-    }
-
-    @Override
-    protected void checkMethodAnnotation(Method method, Object instance)
-            throws NamingException, IllegalAccessException, InvocationTargetException
-    {
-        super.checkMethodAnnotation(method, instance);
-        if (method.isAnnotationPresent(Resource.class))
-        {
-            Resource annotation =  method.getAnnotation(Resource.class);
-            lookupMethodResource(context, instance, method, annotation.name());
-        }
-        if (method.isAnnotationPresent(EJB.class))
-        {
-            EJB annotation =  method.getAnnotation(EJB.class);
-            lookupMethodResource(context, instance, method, annotation.name());
-        }
-        // not implemented since 1.x, let's ignore it for now
-        /*if (method.isAnnotationPresent(WebServiceRef.class)) {
-            WebServiceRef annotation =
-                (WebServiceRef) method.getAnnotation(WebServiceRef.class);
-            lookupMethodResource(context, instance, methods, annotation.name());
-        }*/
-        if (method.isAnnotationPresent(PersistenceContext.class))
-        {
-            PersistenceContext annotation = method.getAnnotation(PersistenceContext.class);
-            lookupMethodResource(context, instance, method, annotation.name());
-        }
-        if (method.isAnnotationPresent(PersistenceUnit.class))
-        {
-            PersistenceUnit annotation = method.getAnnotation(PersistenceUnit.class);
-            lookupMethodResource(context, instance, method, annotation.name());
-        }
-    }
-
-    @Override
-    protected void checkFieldAnnotation(Field field, Object instance)
-            throws NamingException, IllegalAccessException
-    {
-        super.checkFieldAnnotation(field, instance);
-        if (field.isAnnotationPresent(EJB.class))
-        {
-            EJB annotation = field.getAnnotation(EJB.class);
-            lookupFieldResource(context, instance, field, annotation.name());
-        }
-        /*if (field.isAnnotationPresent(WebServiceRef.class)) {
-            WebServiceRef annotation =
-                (WebServiceRef) field.getAnnotation(WebServiceRef.class);
-            lookupFieldResource(context, instance, field, annotation.name());
-        }*/
-        if (field.isAnnotationPresent(PersistenceContext.class))
-        {
-            PersistenceContext annotation = field.getAnnotation(PersistenceContext.class);
-            lookupFieldResource(context, instance, field, annotation.name());
-        }
-        if (field.isAnnotationPresent(PersistenceUnit.class))
-        {
-            PersistenceUnit annotation = field.getAnnotation(PersistenceUnit.class);
-            lookupFieldResource(context, instance, field, annotation.name());
-        }
-    }
-}
diff --git a/impl/src/main/java/org/apache/myfaces/config/annotation/DefaultLifecycleProviderFactory.java b/impl/src/main/java/org/apache/myfaces/config/annotation/DefaultLifecycleProviderFactory.java
deleted file mode 100644
index 032ce62..0000000
--- a/impl/src/main/java/org/apache/myfaces/config/annotation/DefaultLifecycleProviderFactory.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- * 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.myfaces.config.annotation;
-
-import java.lang.reflect.InvocationTargetException;
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.faces.FacesException;
-import javax.faces.context.ExternalContext;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
-import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFWebConfigParam;
-import org.apache.myfaces.util.lang.ClassUtils;
-import org.apache.myfaces.spi.ServiceProviderFinderFactory;
-
-/*
- * Date: Mar 12, 2007
- * Time: 9:53:40 PM
- */
-public class DefaultLifecycleProviderFactory extends LifecycleProviderFactory
-{
-    private static Logger log = Logger.getLogger(DefaultLifecycleProviderFactory.class.getName());
-
-    /**
-     * Define the class implementing LifecycleProvider2 interface to handle PostConstruct and PreDestroy annotations.
-     * 
-     * <p>This also can be configured using a SPI entry (/META-INF/services/...).
-     * </p>
-     */
-    public static final String LIFECYCLE_PROVIDER_INSTANCE_KEY
-            = LifecycleProvider.class.getName() + ".LIFECYCLE_PROVIDER_INSTANCE";
-
-    @JSFWebConfigParam(name="org.apache.myfaces.config.annotation.LifecycleProvider", since="1.1")
-    public static final String LIFECYCLE_PROVIDER = LifecycleProvider.class.getName();
-
-
-    public DefaultLifecycleProviderFactory()
-    {
-    }
-
-    @Override
-    public LifecycleProvider getLifecycleProvider(ExternalContext externalContext)
-    {
-        LifecycleProvider lifecycleProvider = null;
-        if (externalContext == null)
-        {
-            // Really in jsf 2.0, this will not happen, because a Startup/Shutdown
-            // FacesContext and ExternalContext are provided on initialization and shutdown,
-            // and in other scenarios the real FacesContext/ExternalContext is provided.
-            log.info("No ExternalContext using fallback LifecycleProvider.");
-            lifecycleProvider = resolveFallbackLifecycleProvider();
-        }
-        else
-        {
-            lifecycleProvider = (LifecycleProvider)
-                    externalContext.getApplicationMap().get(LIFECYCLE_PROVIDER_INSTANCE_KEY);
-        }
-        if (lifecycleProvider == null)
-        {
-            if (!resolveLifecycleProviderFromExternalContext(externalContext))
-            {
-                if (!resolveLifecycleProviderFromService(externalContext))
-                {
-                    lifecycleProvider = resolveFallbackLifecycleProvider();
-                    externalContext.getApplicationMap().put(LIFECYCLE_PROVIDER_INSTANCE_KEY, lifecycleProvider);
-                }
-                else
-                {
-                    //Retrieve it because it was resolved
-                    lifecycleProvider = (LifecycleProvider)
-                            externalContext.getApplicationMap().get(LIFECYCLE_PROVIDER_INSTANCE_KEY);
-                }
-            }
-            else
-            {
-                //Retrieve it because it was resolved
-                lifecycleProvider = (LifecycleProvider)
-                        externalContext.getApplicationMap().get(LIFECYCLE_PROVIDER_INSTANCE_KEY);
-            }
-            log.info("Using LifecycleProvider "+ lifecycleProvider.getClass().getName());
-        }
-        return lifecycleProvider;
-    }
-
-    @Override
-    public void release()
-    {
-    }
-
-
-
-    private boolean resolveLifecycleProviderFromExternalContext(ExternalContext externalContext)
-    {
-        try
-        {
-            String lifecycleProvider = externalContext.getInitParameter(LIFECYCLE_PROVIDER);
-            if (lifecycleProvider != null)
-            {
-                Object obj = createClass(lifecycleProvider, externalContext);
-
-                if (obj instanceof LifecycleProvider)
-                {
-                    externalContext.getApplicationMap().put(LIFECYCLE_PROVIDER_INSTANCE_KEY, obj);
-                    return true;
-                }
-            }
-        }
-        catch (ClassNotFoundException | InstantiationException | IllegalAccessException | InvocationTargetException e)
-        {
-            log.log(Level.SEVERE, "", e);
-        }
-        return false;
-    }
-
-
-    private boolean resolveLifecycleProviderFromService(ExternalContext externalContext)
-    {
-        boolean returnValue = false;
-        final ExternalContext extContext = externalContext;
-        try
-        {
-            if (System.getSecurityManager() != null)
-            {
-                returnValue = AccessController.doPrivileged((PrivilegedExceptionAction<Boolean>) () -> {
-                    List<String> classList
-                            = ServiceProviderFinderFactory.getServiceProviderFinder(extContext).
-                                    getServiceProviderList(LIFECYCLE_PROVIDER);
-                    for (String className : classList)
-                    {
-                        Object obj = createClass(className,extContext);
-                        if (DiscoverableLifecycleProvider.class.isAssignableFrom(obj.getClass()))
-                        {
-                            DiscoverableLifecycleProvider discoverableLifecycleProvider =
-                                    (DiscoverableLifecycleProvider) obj;
-                            if (discoverableLifecycleProvider.isAvailable())
-                            {
-                                extContext.getApplicationMap().put(LIFECYCLE_PROVIDER_INSTANCE_KEY,
-                                        discoverableLifecycleProvider);
-                                return true;
-                            }
-                        }
-                    }
-                    return false;
-                });
-            }
-            else
-            {
-                List<String> classList = ServiceProviderFinderFactory.getServiceProviderFinder(extContext).
-                        getServiceProviderList(LIFECYCLE_PROVIDER);
-                for (String className : classList)
-                {
-                    Object obj = createClass(className,extContext);
-                    if (DiscoverableLifecycleProvider.class.isAssignableFrom(obj.getClass()))
-                    {
-                        DiscoverableLifecycleProvider discoverableLifecycleProvider
-                                = (DiscoverableLifecycleProvider) obj;
-                        if (discoverableLifecycleProvider.isAvailable())
-                        {
-                            extContext.getApplicationMap().put(LIFECYCLE_PROVIDER_INSTANCE_KEY,
-                                                               discoverableLifecycleProvider);
-                            return true;
-                        }
-                    }
-                }
-            }
-        }
-        catch (ClassNotFoundException | NoClassDefFoundError e)
-        {
-            // ignore
-        }
-        catch (InstantiationException | IllegalAccessException | InvocationTargetException e)
-        {
-            log.log(Level.SEVERE, "", e);
-        }
-        catch (PrivilegedActionException e)
-        {
-            throw new FacesException(e);
-        }
-        return returnValue;
-    }
-
-    private Object createClass(String className, ExternalContext externalContext)
-            throws InstantiationException, IllegalAccessException, InvocationTargetException, ClassNotFoundException
-    {
-        Class<?> clazz = ClassUtils.classForName(className);
-
-        try
-        {
-            return ClassUtils.newInstance(clazz, new Class<?>[]{ ExternalContext.class }, externalContext);
-        }
-        catch (NoSuchMethodException e)
-        {
-            return ClassUtils.newInstance(clazz);
-        }
-    }
-
-
-    private LifecycleProvider resolveFallbackLifecycleProvider()
-    {
-        try
-        {
-            ClassUtils.classForName("javax.annotation.PreDestroy");
-        }
-        catch (ClassNotFoundException e)
-        {
-            // no annotation available don't process annotations
-            return new NoAnnotationLifecyleProvider(); 
-        }
-        Context context;
-        try
-        {
-            context = new InitialContext();
-            try
-            {
-                ClassUtils.classForName("javax.ejb.EJB");
-                // Asume full JEE 5 container
-                return new AllAnnotationLifecycleProvider(context);
-            }
-            catch (ClassNotFoundException e)
-            {
-                // something else
-                return new ResourceAnnotationLifecycleProvider(context);
-            }
-        }
-        catch (NamingException e)
-        {
-            // no initial context available no injection
-            log.log(Level.SEVERE, "No InitialContext found. Using NoInjectionAnnotationProcessor.", e);
-            return new NoInjectionAnnotationLifecycleProvider();
-        }
-        catch (NoClassDefFoundError e)
-        {
-            //On Google App Engine, javax.naming.Context is a restricted class.
-            //In that case, NoClassDefFoundError is thrown. stageName needs to be configured
-            //below by context parameter.
-            log.log(Level.SEVERE, "No InitialContext class definition found. Using NoInjectionAnnotationProcessor.");
-            return new NoInjectionAnnotationLifecycleProvider();
-        }
-    }
-}
diff --git a/impl/src/main/java/org/apache/myfaces/config/annotation/DiscoverableLifecycleProvider.java b/impl/src/main/java/org/apache/myfaces/config/annotation/DiscoverableLifecycleProvider.java
deleted file mode 100644
index 82a0cd2..0000000
--- a/impl/src/main/java/org/apache/myfaces/config/annotation/DiscoverableLifecycleProvider.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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.myfaces.config.annotation;
-
-/**
- * @author bommel
- */
-public interface DiscoverableLifecycleProvider extends LifecycleProvider
-{
-    boolean isAvailable();
-}
diff --git a/impl/src/main/java/org/apache/myfaces/config/annotation/LifecycleProvider.java b/impl/src/main/java/org/apache/myfaces/config/annotation/LifecycleProvider.java
deleted file mode 100644
index 1373e2f..0000000
--- a/impl/src/main/java/org/apache/myfaces/config/annotation/LifecycleProvider.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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.myfaces.config.annotation;
-
-import java.lang.reflect.InvocationTargetException;
-
-import javax.naming.NamingException;
-
-/**
- * Proposed interface to annotation service. An implementation of this class needs to know the appropriate classloader,
- * dependencies to be injected, and lifecycle methods to be called.
- *
- * @version $Rev$ $Date$
- */
-public interface LifecycleProvider
-{
-
-    /**
-     * Create an object of the class with the supplied name, inject dependencies as appropriate,
-     * and call a postContruct method as appropriate.
-     *
-     * @param className name of the class of the desired object
-     * @return a fully constructed, dependency-injected, and initialized object.
-     */
-    Object newInstance(String className)
-            throws ClassNotFoundException, IllegalAccessException, InstantiationException,
-            NamingException, InvocationTargetException;
-
-    /**
-     * Take whatever steps are needed to shut down the object, including calling a preDestroy method.
-     *
-     * @param o object to shut down.
-     */
-    void destroyInstance(Object o) throws IllegalAccessException, InvocationTargetException;
-}
diff --git a/impl/src/main/java/org/apache/myfaces/config/annotation/LifecycleProvider2.java b/impl/src/main/java/org/apache/myfaces/config/annotation/LifecycleProvider2.java
deleted file mode 100644
index 99dd21e..0000000
--- a/impl/src/main/java/org/apache/myfaces/config/annotation/LifecycleProvider2.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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.myfaces.config.annotation;
-
-import java.lang.reflect.InvocationTargetException;
-
-import javax.naming.NamingException;
-
-/**
- * Proposed interface to annotation service. An implementation of this class needs to know the appropriate classloader,
- * dependencies to be injected, and lifecycle methods to be called.
- *
- * @version $Rev$ $Date$
- */
-public interface LifecycleProvider2 extends LifecycleProvider
-{
-    /**
-     * Create an object of the class with the supplied name, inject dependencies as appropriate.
-     *
-     * @param className name of the class of the desired object
-     * @return a fully constructed, dependency-injected, and initialized object.
-     */
-    @Override
-    Object newInstance(String className)
-            throws ClassNotFoundException, IllegalAccessException, InstantiationException,
-            NamingException, InvocationTargetException;
-
-    /**
-     * Call a postConstruct method as appropriate.
-     *
-     * @param o object to initialize
-     */
-    void postConstruct(Object o) throws IllegalAccessException, InvocationTargetException;
-}
diff --git a/impl/src/main/java/org/apache/myfaces/config/annotation/LifecycleProviderFactory.java b/impl/src/main/java/org/apache/myfaces/config/annotation/LifecycleProviderFactory.java
deleted file mode 100644
index e70d05f..0000000
--- a/impl/src/main/java/org/apache/myfaces/config/annotation/LifecycleProviderFactory.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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.myfaces.config.annotation;
-
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-import java.util.Map;
-
-import javax.faces.FacesException;
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-
-import org.apache.myfaces.spi.impl.SpiUtils;
-
-public abstract class LifecycleProviderFactory
-{
-    protected static final String FACTORY_DEFAULT = DefaultLifecycleProviderFactory.class.getName();
-
-    private static final String FACTORY_KEY = LifecycleProviderFactory.class.getName();
-
-    public static LifecycleProviderFactory getLifecycleProviderFactory()
-    {
-        // Since we always provide a StartupFacesContext on initialization time, this is safe:
-        return getLifecycleProviderFactory(FacesContext.getCurrentInstance().getExternalContext());
-    }
-    
-    public static LifecycleProviderFactory getLifecycleProviderFactory(ExternalContext ctx)
-    {
-        Map<String, Object> applicationMap = ctx.getApplicationMap();
-        LifecycleProviderFactory instance = (LifecycleProviderFactory) applicationMap.get(FACTORY_KEY);
-        if (instance != null)
-        {
-            return instance;
-        }
-        LifecycleProviderFactory lpf = null;
-        try
-        {
-
-            if (System.getSecurityManager() != null)
-            {
-                final ExternalContext ectx = ctx; 
-                lpf = (LifecycleProviderFactory) AccessController.doPrivileged(
-                        (PrivilegedExceptionAction) () -> SpiUtils.build(ectx,
-                                LifecycleProviderFactory.class, FACTORY_DEFAULT));
-            }
-            else
-            {
-                lpf = (LifecycleProviderFactory) SpiUtils.build(ctx, LifecycleProviderFactory.class, FACTORY_DEFAULT);
-            }
-        }
-        catch (PrivilegedActionException pae)
-        {
-            throw new FacesException(pae);
-        }
-        if (lpf != null)
-        {
-            applicationMap.put(FACTORY_KEY, lpf);
-        }
-        return lpf;
-    }
-
-
-    public static void setLifecycleProviderFactory(LifecycleProviderFactory instance)
-    {
-        FacesContext.getCurrentInstance().getExternalContext().getApplicationMap().put(FACTORY_KEY, instance);
-    }
-
-    public abstract LifecycleProvider getLifecycleProvider(ExternalContext externalContext);
-
-    public abstract void release();
-
-}
diff --git a/impl/src/main/java/org/apache/myfaces/config/annotation/NoAnnotationLifecyleProvider.java b/impl/src/main/java/org/apache/myfaces/config/annotation/NoAnnotationLifecyleProvider.java
deleted file mode 100644
index 5d6b59d..0000000
--- a/impl/src/main/java/org/apache/myfaces/config/annotation/NoAnnotationLifecyleProvider.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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.myfaces.config.annotation;
-
-import org.apache.myfaces.util.lang.ClassUtils;
-
-import java.lang.reflect.InvocationTargetException;
-
-public class NoAnnotationLifecyleProvider implements LifecycleProvider2
-{
-    @Override
-    public void destroyInstance(Object o) throws IllegalAccessException, InvocationTargetException
-    {
-
-    }
-
-    @Override
-    public Object newInstance(String className)
-            throws InstantiationException, IllegalAccessException, InvocationTargetException, ClassNotFoundException
-    {
-        return ClassUtils.classForName(className).newInstance();
-    }
-
-    @Override
-    public void postConstruct(Object o) throws IllegalAccessException, InvocationTargetException
-    {
-        // No op
-    }
-
-}
diff --git a/impl/src/main/java/org/apache/myfaces/config/annotation/NoInjectionAnnotationLifecycleProvider.java b/impl/src/main/java/org/apache/myfaces/config/annotation/NoInjectionAnnotationLifecycleProvider.java
deleted file mode 100644
index 8738ef5..0000000
--- a/impl/src/main/java/org/apache/myfaces/config/annotation/NoInjectionAnnotationLifecycleProvider.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * 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.myfaces.config.annotation;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.WeakHashMap;
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-import javax.naming.NamingException;
-
-import org.apache.myfaces.util.lang.ClassUtils;
-
-/**
- * See SRV.14.5 Servlet Specification Version 2.5 JSR 154
- * and Common Annotations for the Java Platform JSR 250
-
- */
-
-public class NoInjectionAnnotationLifecycleProvider implements LifecycleProvider2
-{
-     /**
-     * Cache the Method instances per ClassLoader using the Class-Name.
-     * NOTE that we do it this way, because the only other valid way in order to support a shared
-     * classloader scenario would be to use a WeakHashMap<Class<?>, Method[]>, but this
-     * creates a cyclic reference between the key and the value of the WeakHashMap which will
-     * most certainly cause a memory leak! Furthermore we can manually cleanup the Map when
-     * the webapp is undeployed just by removing the Map for the current ClassLoader. 
-     */
-    private volatile static WeakHashMap<ClassLoader, Map<Class,Method[]> > declaredMethodBeans = 
-            new WeakHashMap<ClassLoader, Map<Class, Method[]>>();
-
-    private static Map<Class,Method[]> getDeclaredMethodBeansMap()
-    {
-        ClassLoader cl = ClassUtils.getContextClassLoader();
-        
-        Map<Class,Method[]> metadata = (Map<Class,Method[]>) declaredMethodBeans.get(cl);
-
-        if (metadata == null)
-        {
-            // Ensure thread-safe put over _metadata, and only create one map
-            // per classloader to hold metadata.
-            synchronized (declaredMethodBeans)
-            {
-                metadata = createDeclaredMethodBeansMap(cl, metadata);
-            }
-        }
-
-        return metadata;
-    }
-    
-    private static Map<Class,Method[]> createDeclaredMethodBeansMap(
-            ClassLoader cl, Map<Class,Method[]> metadata)
-    {
-        metadata = (Map<Class,Method[]>) declaredMethodBeans.get(cl);
-        if (metadata == null)
-        {
-            metadata = new HashMap<>();
-            declaredMethodBeans.put(cl, metadata);
-        }
-        return metadata;
-    }
-
-    @Override
-    public Object newInstance(String className)
-           throws InstantiationException, IllegalAccessException, NamingException,
-            InvocationTargetException, ClassNotFoundException
-    {
-        Class clazz = ClassUtils.classForName(className);
-        Object object = clazz.newInstance();
-        processAnnotations(object);
-        //postConstruct(object);
-        return object;
-    }
-    
-    
-    Method[] getDeclaredMethods(Class clazz)
-    {
-        Map<Class,Method[]> declaredMethodBeansMap = getDeclaredMethodBeansMap();
-        Method[] methods = declaredMethodBeansMap.get(clazz);
-        if (methods == null)
-        {
-            methods = clazz.getDeclaredMethods();
-            synchronized(declaredMethodBeansMap)
-            {
-                declaredMethodBeansMap.put(clazz, methods);
-            }
-        }
-        return methods;
-    }
-
-    /**
-     * Call postConstruct method on the specified instance.
-     */
-    @Override
-    public void postConstruct(Object instance)
-            throws IllegalAccessException, InvocationTargetException
-    {
-        // TODO the servlet spec is not clear about searching in superclass??
-        Class clazz = instance.getClass();
-        Method[] methods = getDeclaredMethods(clazz);
-        if (methods == null)
-        {
-            methods = clazz.getDeclaredMethods();
-            Map<Class,Method[]> declaredMethodBeansMap = getDeclaredMethodBeansMap();
-            synchronized(declaredMethodBeansMap)
-            {
-                declaredMethodBeansMap.put(clazz, methods);
-            }
-        }
-        Method postConstruct = null;
-        for (int i = 0; i < methods.length; i++)
-        {
-            Method method = methods[i];
-            if (method.isAnnotationPresent(PostConstruct.class))
-            {
-                // a method that does not take any arguments
-                // the method must not be static
-                // must not throw any checked expections
-                // the return value must be void
-                // the method may be public, protected, package private or private
-
-                if ((postConstruct != null)
-                        || (method.getParameterTypes().length != 0)
-                        || (Modifier.isStatic(method.getModifiers()))
-                        || (method.getExceptionTypes().length > 0)
-                        || (!method.getReturnType().getName().equals("void")))
-                {
-                    throw new IllegalArgumentException("Invalid PostConstruct annotation");
-                }
-                postConstruct = method;
-            }
-        }
-
-        invokeAnnotatedMethod(postConstruct, instance);
-
-    }
-
-    @Override
-    public void destroyInstance(Object instance)
-            throws IllegalAccessException, InvocationTargetException
-    {
-
-        // TODO the servlet spec is not clear about searching in superclass??
-        // May be only check non private fields and methods
-        Class clazz = instance.getClass();
-        Method[] methods = getDeclaredMethods(clazz);
-        Method preDestroy = null;
-        for (int i = 0; i < methods.length; i++)
-        {
-            Method method = methods[i];
-            if (method.isAnnotationPresent(PreDestroy.class))
-            {
-                // must not throw any checked expections
-                // the method must not be static
-                // must not throw any checked expections
-                // the return value must be void
-                // the method may be public, protected, package private or private
-
-                if ((preDestroy != null)
-                        || (method.getParameterTypes().length != 0)
-                        || (Modifier.isStatic(method.getModifiers()))
-                        || (method.getExceptionTypes().length > 0)
-                        || (!method.getReturnType().getName().equals("void")))
-                {
-                    throw new IllegalArgumentException("Invalid PreDestroy annotation");
-                }
-                preDestroy = method;
-            }
-        }
-
-        invokeAnnotatedMethod(preDestroy, instance);
-
-    }
-
-    private void invokeAnnotatedMethod(Method method, Object instance)
-                throws IllegalAccessException, InvocationTargetException
-    {
-        // At the end the annotated
-        // method is invoked
-        if (method != null)
-        {
-            boolean accessibility = method.isAccessible();
-            method.setAccessible(true);
-            method.invoke(instance);
-            method.setAccessible(accessibility);
-        }
-    }
-
-     /**
-     * Inject resources in specified instance.
-     */
-    protected void processAnnotations(Object instance)
-            throws IllegalAccessException, InvocationTargetException, NamingException
-    {
-
-    }
-
-}
diff --git a/impl/src/main/java/org/apache/myfaces/config/annotation/ResourceAnnotationLifecycleProvider.java b/impl/src/main/java/org/apache/myfaces/config/annotation/ResourceAnnotationLifecycleProvider.java
deleted file mode 100644
index 874a394..0000000
--- a/impl/src/main/java/org/apache/myfaces/config/annotation/ResourceAnnotationLifecycleProvider.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * 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.myfaces.config.annotation;
-
-import javax.naming.NamingException;
-import javax.naming.Context;
-import javax.annotation.Resource;
-import java.lang.reflect.Method;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Field;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.WeakHashMap;
-import org.apache.myfaces.util.lang.ClassUtils;
-
-public class ResourceAnnotationLifecycleProvider extends NoInjectionAnnotationLifecycleProvider
-{
-    /**
-     * Cache the Method instances per ClassLoader using the Class-Name.
-     * NOTE that we do it this way, because the only other valid way in order to support a shared
-     * classloader scenario would be to use a WeakHashMap<Class<?>, Method[]>, but this
-     * creates a cyclic reference between the key and the value of the WeakHashMap which will
-     * most certainly cause a memory leak! Furthermore we can manually cleanup the Map when
-     * the webapp is undeployed just by removing the Map for the current ClassLoader. 
-     */
-    private volatile static WeakHashMap<ClassLoader, Map<Class,Field[]> > declaredFieldBeans = 
-            new WeakHashMap<ClassLoader, Map<Class, Field[]>>();
-
-    protected Context context;
-    private static final String JAVA_COMP_ENV = "java:comp/env/";
-
-    public ResourceAnnotationLifecycleProvider(Context context)
-    {
-        this.context = context;
-    }
-
-    private static Map<Class,Field[]> getDeclaredFieldBeansMap()
-    {
-        ClassLoader cl = ClassUtils.getContextClassLoader();
-        
-        Map<Class,Field[]> metadata = (Map<Class,Field[]>) declaredFieldBeans.get(cl);
-
-        if (metadata == null)
-        {
-            // Ensure thread-safe put over _metadata, and only create one map
-            // per classloader to hold metadata.
-            synchronized (declaredFieldBeans)
-            {
-                metadata = createDeclaredFieldBeansMap(cl, metadata);
-            }
-        }
-
-        return metadata;
-    }
-    
-    private static Map<Class,Field[]> createDeclaredFieldBeansMap(ClassLoader cl, Map<Class,Field[]> metadata)
-    {
-        metadata = (Map<Class,Field[]>) declaredFieldBeans.get(cl);
-        if (metadata == null)
-        {
-            metadata = new HashMap<>();
-            declaredFieldBeans.put(cl, metadata);
-        }
-        return metadata;
-    }
-
-    /**
-     * Inject resources in specified instance.
-     */
-    @Override
-    protected void processAnnotations(Object instance)
-            throws IllegalAccessException, InvocationTargetException, NamingException
-    {
-        if (context == null)
-        {
-            // No resource injection
-            return;
-        }
-
-        checkAnnotation(instance.getClass(), instance);
-
-        /* 
-         * May be only check non private fields and methods
-         * for @Resource (JSR 250), if used all superclasses MUST be examined
-         * to discover all uses of this annotation.
-         */
-
-        Class superclass = instance.getClass().getSuperclass();
-        while (superclass != null && (!superclass.equals(Object.class)))
-        {
-            checkAnnotation(superclass, instance);
-            superclass = superclass.getSuperclass();
-        } 
-    }
-    
-    Field[] getDeclaredFieldBeans(Class clazz)
-    {
-        Map<Class,Field[]> declaredFieldBeansMap = getDeclaredFieldBeansMap();
-        Field[] fields = declaredFieldBeansMap.get(clazz);
-        if (fields == null)
-        {
-            fields = clazz.getDeclaredFields();
-            synchronized(declaredFieldBeansMap)
-            {
-                declaredFieldBeansMap.put(clazz, fields);
-            }
-        }
-        return fields;
-    }
-
-    private void checkAnnotation(Class<?> clazz, Object instance)
-            throws NamingException, IllegalAccessException, InvocationTargetException
-    {
-        // Initialize fields annotations
-        Field[] fields = getDeclaredFieldBeans(clazz);
-        for (int i = 0; i < fields.length; i++)
-        {
-            Field field = fields[i];
-            checkFieldAnnotation(field, instance);
-        }
-
-        // Initialize methods annotations
-        Method[] methods = getDeclaredMethods(clazz);
-        for (int i = 0; i < methods.length; i++)
-        {
-            Method method = methods[i];
-            checkMethodAnnotation(method, instance);
-        }
-    }
-
-    protected void checkMethodAnnotation(Method method, Object instance)
-            throws NamingException, IllegalAccessException, InvocationTargetException
-    {
-        if (method.isAnnotationPresent(Resource.class))
-        {
-            Resource annotation = method.getAnnotation(Resource.class);
-            lookupMethodResource(context, instance, method, annotation.name());
-        }
-    }
-
-    protected void checkFieldAnnotation(Field field, Object instance)
-            throws NamingException, IllegalAccessException
-    {
-        if (field.isAnnotationPresent(Resource.class))
-        {
-            Resource annotation = field.getAnnotation(Resource.class);
-            lookupFieldResource(context, instance, field, annotation.name());
-        }
-    }
-
-    /**
-     * Inject resources in specified field.
-     */
-    protected static void lookupFieldResource(javax.naming.Context context, Object instance, Field field, String name)
-            throws NamingException, IllegalAccessException
-    {
-
-        Object lookedupResource;
-
-        if ((name != null) && (name.length() > 0))
-        {
-            // TODO local or global JNDI
-            lookedupResource = context.lookup(JAVA_COMP_ENV + name);
-        }
-        else
-        {
-            // TODO local or global JNDI 
-            lookedupResource = context.lookup(JAVA_COMP_ENV + instance.getClass().getName() + '/' + field.getName());
-        }
-
-        boolean accessibility = field.isAccessible();
-        field.setAccessible(true);
-        field.set(instance, lookedupResource);
-        field.setAccessible(accessibility);
-    }
-
-
-    /**
-     * Inject resources in specified method.
-     */
-    protected static void lookupMethodResource(javax.naming.Context context, Object instance, Method method,
-            String name) throws NamingException, IllegalAccessException, InvocationTargetException
-    {
-
-        if (!method.getName().startsWith("set")
-                || method.getParameterTypes().length != 1
-                || !method.getReturnType().getName().equals("void"))
-        {
-            throw new IllegalArgumentException("Invalid method resource injection annotation");
-        }
-
-        Object lookedupResource;
-
-        if ((name != null) && (name.length() > 0))
-        {
-            // TODO local or global JNDI
-            lookedupResource = context.lookup(JAVA_COMP_ENV + name);
-        }
-        else
-        {
-            // TODO local or global JNDI
-            lookedupResource =
-                    context.lookup(JAVA_COMP_ENV + instance.getClass().getName() + '/' + getFieldName(method));
-        }
-
-        boolean accessibility = method.isAccessible();
-        method.setAccessible(true);
-        method.invoke(instance, lookedupResource);
-        method.setAccessible(accessibility);
-    }
-
-    /**
-     * Returns the field name for the given Method.
-     * E.g. setName() will be "name". 
-     *
-     * @param setter the setter method
-     * @return the field name of the given setter method
-     */
-    protected static String getFieldName(Method setter)
-    {
-        StringBuilder name = new StringBuilder(setter.getName());
-
-        // remove 'set'
-        name.delete(0, 3);
-
-        // lowercase first char
-        name.setCharAt(0, Character.toLowerCase(name.charAt(0)));
-
-        return name.toString();
-    }
-
-}
diff --git a/impl/src/main/java/org/apache/myfaces/config/annotation/Tomcat7AnnotationLifecycleProvider.java b/impl/src/main/java/org/apache/myfaces/config/annotation/Tomcat7AnnotationLifecycleProvider.java
deleted file mode 100644
index 1a38161..0000000
--- a/impl/src/main/java/org/apache/myfaces/config/annotation/Tomcat7AnnotationLifecycleProvider.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * 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.myfaces.config.annotation;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Map;
-import java.util.WeakHashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.faces.FacesException;
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-import javax.naming.NamingException;
-
-import org.apache.myfaces.util.lang.ClassUtils;
-import org.apache.tomcat.InstanceManager;
-
-/**
- * An annotation lifecycle provider for Tomcat 7.
- */
-public class Tomcat7AnnotationLifecycleProvider implements DiscoverableLifecycleProvider, LifecycleProvider2
-{
-    private static final Logger log = Logger.getLogger(Tomcat7AnnotationLifecycleProvider.class.getName());
-    
-    private WeakHashMap<ClassLoader, InstanceManager> instanceManagers = null;
-
-    public Tomcat7AnnotationLifecycleProvider(ExternalContext externalContext)
-    {
-        instanceManagers = new WeakHashMap<>();
-    }
-
-    @Override
-    public Object newInstance(String className) throws ClassNotFoundException, IllegalAccessException,
-            InstantiationException, NamingException, InvocationTargetException
-    {
-        Class<?> clazz = ClassUtils.classForName(className);
-        if (log.isLoggable(Level.FINEST))
-        {
-            log.finest("Creating instance of " + className);
-        }
-        Object object = clazz.newInstance();
-
-        return object;
-    }
-
-    @Override
-    public void destroyInstance(Object instance) throws IllegalAccessException, InvocationTargetException
-    {
-        InstanceManager manager = instanceManagers.get(ClassUtils.getContextClassLoader());
-        if (manager != null)
-        {
-            manager.destroyInstance(instance);
-        }
-    }
-
-    @Override
-    public void postConstruct(Object instance) throws IllegalAccessException, InvocationTargetException
-    {
-        InstanceManager manager = instanceManagers.get(ClassUtils.getContextClassLoader());
-        if (manager == null)
-        {
-            //Initialize manager
-            manager = initManager();
-        }
-
-        //Is initialized
-        if (manager != null)
-        {
-            //Inject resources
-            try 
-            {
-                manager.newInstance(instance);
-            }
-            catch (NamingException e)
-            {
-                throw new FacesException(e);
-            }
-        }
-    }
-
-    @Override
-    public boolean isAvailable()
-    {
-        try
-        {
-            ClassUtils.classForName("org.apache.tomcat.InstanceManager");
-            return true;
-        }
-        catch (Exception e)
-        {
-            // ignore
-        }
-
-        return false;
-    }
-
-    private InstanceManager initManager()
-    {
-        FacesContext context = FacesContext.getCurrentInstance();
-        if (context == null)
-        {
-            return null;
-        }
-
-        ExternalContext extCtx = context.getExternalContext();
-        if (extCtx == null)
-        {
-            return null;
-        }
-
-        // get application map to access ServletContext attributes
-        Map<String, Object> applicationMap = extCtx.getApplicationMap();
-
-        InstanceManager instanceManager = (InstanceManager) applicationMap.get(InstanceManager.class.getName());
-        if (instanceManager != null)
-        {
-            instanceManagers.put(ClassUtils.getContextClassLoader(), instanceManager);
-        }
-
-        return instanceManager;
-    }
-
-}
diff --git a/impl/src/main/java/org/apache/myfaces/spi/ServiceProviderFinder.java b/impl/src/main/java/org/apache/myfaces/spi/ServiceProviderFinder.java
index 76e025d..698d0c0 100644
--- a/impl/src/main/java/org/apache/myfaces/spi/ServiceProviderFinder.java
+++ b/impl/src/main/java/org/apache/myfaces/spi/ServiceProviderFinder.java
@@ -76,8 +76,6 @@ public abstract class ServiceProviderFinder
         "org.apache.myfaces.spi.ViewScopeProviderFactory",
         "org.apache.myfaces.spi.WebConfigProvider",
         "org.apache.myfaces.spi.WebConfigProviderFactory",
-        "org.apache.myfaces.config.annotation.LifecycleProvider",
-        "org.apache.myfaces.config.annotation.LifecycleProviderFactory",
     };
     
     /**
diff --git a/impl/src/main/java/org/apache/myfaces/spi/impl/DefaultInjectionProviderFactory.java b/impl/src/main/java/org/apache/myfaces/spi/impl/DefaultInjectionProviderFactory.java
index 82ae81b..5b70727 100644
--- a/impl/src/main/java/org/apache/myfaces/spi/impl/DefaultInjectionProviderFactory.java
+++ b/impl/src/main/java/org/apache/myfaces/spi/impl/DefaultInjectionProviderFactory.java
@@ -58,45 +58,45 @@ public class DefaultInjectionProviderFactory extends InjectionProviderFactory
     @Override
     public InjectionProvider getInjectionProvider(ExternalContext externalContext)
     {
-        InjectionProvider lifecycleProvider = null;
+        InjectionProvider injectionProvider = null;
         if (externalContext == null)
         {
             // Really in jsf 2.0, this will not happen, because a Startup/Shutdown
             // FacesContext and ExternalContext are provided on initialization and shutdown,
             // and in other scenarios the real FacesContext/ExternalContext is provided.
             log.info("No ExternalContext using fallback InjectionProvider.");
-            lifecycleProvider = resolveFallbackInjectionProvider();
+            injectionProvider = resolveFallbackInjectionProvider();
         }
         else
         {
-            lifecycleProvider = (InjectionProvider)
+            injectionProvider = (InjectionProvider)
                     externalContext.getApplicationMap().get(INJECTION_PROVIDER_INSTANCE_KEY);
         }
-        if (lifecycleProvider == null)
+        if (injectionProvider == null)
         {
             if (!resolveInjectionProviderFromExternalContext(externalContext))
             {
                 if (!resolveInjectionProviderFromService(externalContext))
                 {
-                    lifecycleProvider = resolveFallbackInjectionProvider();
-                    externalContext.getApplicationMap().put(INJECTION_PROVIDER_INSTANCE_KEY, lifecycleProvider);
+                    injectionProvider = resolveFallbackInjectionProvider();
+                    externalContext.getApplicationMap().put(INJECTION_PROVIDER_INSTANCE_KEY, injectionProvider);
                 }
                 else
                 {
                     //Retrieve it because it was resolved
-                    lifecycleProvider = (InjectionProvider)
+                    injectionProvider = (InjectionProvider)
                             externalContext.getApplicationMap().get(INJECTION_PROVIDER_INSTANCE_KEY);
                 }
             }
             else
             {
                 //Retrieve it because it was resolved
-                lifecycleProvider = (InjectionProvider)
+                injectionProvider = (InjectionProvider)
                         externalContext.getApplicationMap().get(INJECTION_PROVIDER_INSTANCE_KEY);
             }
-            log.fine("Using InjectionProvider " + lifecycleProvider.getClass().getName());
+            log.fine("Using InjectionProvider " + injectionProvider.getClass().getName());
         }
-        return lifecycleProvider;
+        return injectionProvider;
     }
 
     @Override
@@ -110,11 +110,11 @@ public class DefaultInjectionProviderFactory extends InjectionProviderFactory
     {
         try
         {
-            String lifecycleProvider = externalContext.getInitParameter(MyfacesConfig.INJECTION_PROVIDER);
-            if (lifecycleProvider != null)
+            String injectionProvider = externalContext.getInitParameter(MyfacesConfig.INJECTION_PROVIDER);
+            if (injectionProvider != null)
             {
 
-                Object obj = createClass(lifecycleProvider, externalContext);
+                Object obj = createClass(injectionProvider, externalContext);
 
                 if (obj instanceof InjectionProvider)
                 {
diff --git a/impl/src/main/java/org/apache/myfaces/webapp/StartupServletContextListener.java b/impl/src/main/java/org/apache/myfaces/webapp/StartupServletContextListener.java
index 03fdc6e..79e9186 100755
--- a/impl/src/main/java/org/apache/myfaces/webapp/StartupServletContextListener.java
+++ b/impl/src/main/java/org/apache/myfaces/webapp/StartupServletContextListener.java
@@ -18,7 +18,6 @@
  */
 package org.apache.myfaces.webapp;
 
-import org.apache.myfaces.config.annotation.LifecycleProviderFactory;
 import org.apache.myfaces.util.lang.ClassUtils;
 
 import javax.faces.FactoryFinder;
@@ -120,8 +119,6 @@ public class StartupServletContextListener implements ServletContextListener
 
             _facesInitializer.destroyFaces(_servletContext);
 
-            LifecycleProviderFactory.getLifecycleProviderFactory().release();
-
             // Destroy startup FacesContext, but note we do before publish postdestroy event on
             // plugins and before release factories.
             if (facesContext != null)
diff --git a/impl/src/main/resources/META-INF/services/org.apache.myfaces.config.annotation.LifecycleProvider b/impl/src/main/resources/META-INF/services/org.apache.myfaces.config.annotation.LifecycleProvider
deleted file mode 100644
index 571ec44..0000000
--- a/impl/src/main/resources/META-INF/services/org.apache.myfaces.config.annotation.LifecycleProvider
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.myfaces.config.annotation.Tomcat7AnnotationLifecycleProvider
\ No newline at end of file
diff --git a/impl/src/test/java/org/apache/myfaces/config/annotation/AnnotatedManagedBean.java b/impl/src/test/java/org/apache/myfaces/config/annotation/AnnotatedManagedBean.java
deleted file mode 100644
index fe3ba34..0000000
--- a/impl/src/test/java/org/apache/myfaces/config/annotation/AnnotatedManagedBean.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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.myfaces.config.annotation;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-
-/**
- * @author Dennis Byrne
- */
-
-class AnnotatedManagedBean {
-
-    private boolean postConstructCalled = false; // using a stub for a mock
-
-    private boolean preDestroyCalled = false; // using a stob for a mock here
-
-    boolean throwExcetion;
-
-
-    public AnnotatedManagedBean()
-    {
-    }
-
-    public AnnotatedManagedBean(boolean throwExcetion) {
-        this.throwExcetion = throwExcetion;
-    }
-
-    @PostConstruct
-    public void postConstruct()  {
-        postConstructCalled = true;
-
-        if (throwExcetion) {
-            throw new RuntimeException();
-        }
-    }
-
-    @PreDestroy
-    public void preDestroy() {
-        preDestroyCalled = true;
-
-        if (throwExcetion) {
-            throw new RuntimeException();
-        }
-    }
-
-    boolean isPostConstructCalled() {
-        return postConstructCalled;
-    }
-
-    boolean isPreDestroyCalled() {
-        return preDestroyCalled;
-    }
-
-}
diff --git a/impl/src/test/java/org/apache/myfaces/config/annotation/AnnotatedManagedBean2.java b/impl/src/test/java/org/apache/myfaces/config/annotation/AnnotatedManagedBean2.java
deleted file mode 100644
index 2d8c56c..0000000
--- a/impl/src/test/java/org/apache/myfaces/config/annotation/AnnotatedManagedBean2.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * 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.myfaces.config.annotation;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-
-/**
- * @author Leonardo Uribe
- */
-
-public class AnnotatedManagedBean2 {
-
-    private boolean postConstructCalled = false; // using a stub for a mock
-
-    private boolean preDestroyCalled = false; // using a stob for a mock here
-
-    boolean throwExcetion;
-
-    private String managedProperty;
-
-    public AnnotatedManagedBean2()
-    {
-    }
-
-    public AnnotatedManagedBean2(boolean throwExcetion) {
-        this.throwExcetion = throwExcetion;
-    }
-
-    @PostConstruct
-    public void postConstruct()  {
-        
-        if (managedProperty == null)
-        {
-            throw new RuntimeException("managedProperty must be initialized before call of postConstruct() method");
-        }
-        
-        postConstructCalled = true;
-
-        if (throwExcetion) {
-            throw new RuntimeException();
-        }
-    }
-
-    @PreDestroy
-    public void preDestroy() {
-        preDestroyCalled = true;
-
-        if (throwExcetion) {
-            throw new RuntimeException();
-        }
-    }
-
-    boolean isPostConstructCalled() {
-        return postConstructCalled;
-    }
-
-    boolean isPreDestroyCalled() {
-        return preDestroyCalled;
-    }
-    
-    public String getManagedProperty() {
-        return managedProperty;
-    }
-
-    public void setManagedProperty(String managedProperty) {
-        //Set throught injection
-        if (postConstructCalled)
-        {
-            throw new RuntimeException();
-        }
-            
-        this.managedProperty = managedProperty;
-    }
-
-}
diff --git a/impl/src/test/java/org/apache/myfaces/config/annotation/AnnotationProcessorTestCase.java b/impl/src/test/java/org/apache/myfaces/config/annotation/AnnotationProcessorTestCase.java
deleted file mode 100644
index 8750c61..0000000
--- a/impl/src/test/java/org/apache/myfaces/config/annotation/AnnotationProcessorTestCase.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.apache.myfaces.config.annotation;
-
-/*
- * 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.
- */
-
-import org.apache.myfaces.test.base.AbstractJsfTestCase;
-
-import javax.naming.NamingException;
-import java.lang.reflect.InvocationTargetException;
-
-
-public class AnnotationProcessorTestCase extends AbstractJsfTestCase
-{
-    protected LifecycleProvider2 lifecycleProvider;
-    protected AnnotatedManagedBean managedBean;
-
-
-    public AnnotationProcessorTestCase(String string)
-    {
-        super(string);
-    }
-
-    public void setUp() throws Exception {
-        super.setUp();
-        lifecycleProvider = new AllAnnotationLifecycleProvider(null);
-        managedBean = new AnnotatedManagedBean();
-    }
-
-    public void testPostConstruct() throws IllegalAccessException, InvocationTargetException, NamingException, InstantiationException, ClassNotFoundException
-    {
-        AnnotatedManagedBean managedBean = (AnnotatedManagedBean) lifecycleProvider.newInstance(AnnotatedManagedBean.class.getName());
-        lifecycleProvider.postConstruct(managedBean);
-        assertTrue(managedBean.isPostConstructCalled());
-        assertFalse(managedBean.isPreDestroyCalled());
-    }
-
-    public void testPreDestroy() throws IllegalAccessException, InvocationTargetException, NamingException, InstantiationException, ClassNotFoundException
-    {
-        AnnotatedManagedBean managedBean = (AnnotatedManagedBean) lifecycleProvider.newInstance(AnnotatedManagedBean.class.getName());
-        lifecycleProvider.postConstruct(managedBean);
-        lifecycleProvider.destroyInstance(managedBean);
-        assertTrue(managedBean.isPostConstructCalled());
-        assertTrue(managedBean.isPreDestroyCalled());
-    }
-
-    public void testPostConstructException() throws IllegalAccessException, InvocationTargetException
-    {
-        try
-        {
-            lifecycleProvider.destroyInstance(new AnnotatedManagedBean(true));
-        } catch (InvocationTargetException e) {
-            return;  
-        }
-        assertTrue(false);
-
-    }
-}
diff --git a/impl/src/test/java/org/apache/myfaces/config/annotation/MockDiscoverableLifecycleProvider.java b/impl/src/test/java/org/apache/myfaces/config/annotation/MockDiscoverableLifecycleProvider.java
deleted file mode 100644
index c0329c7..0000000
--- a/impl/src/test/java/org/apache/myfaces/config/annotation/MockDiscoverableLifecycleProvider.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.apache.myfaces.config.annotation;
-
-/*
- * 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.
- */
-
-
-import javax.naming.NamingException;
-import java.lang.reflect.InvocationTargetException;
-
-
-
-public class MockDiscoverableLifecycleProvider implements DiscoverableLifecycleProvider
-{
-    private LifecycleProvider processor = new NoInjectionAnnotationLifecycleProvider();
-
-    public boolean isAvailable()
-    {
-        return true;
-    }
-
-    public Object newInstance(String className) throws InstantiationException, IllegalAccessException, NamingException, InvocationTargetException, ClassNotFoundException
-    {
-        return processor.newInstance(className);
-    }
-
-
-    public void destroyInstance(Object o) throws IllegalAccessException, InvocationTargetException
-    {
-       processor.destroyInstance(o);
-    }
-}
diff --git a/impl/src/test/java/org/apache/myfaces/config/annotation/MockLifecycleProvider.java b/impl/src/test/java/org/apache/myfaces/config/annotation/MockLifecycleProvider.java
deleted file mode 100644
index e884832..0000000
--- a/impl/src/test/java/org/apache/myfaces/config/annotation/MockLifecycleProvider.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package org.apache.myfaces.config.annotation;
-
-/*
- * 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.
- */
-
-
-import javax.naming.NamingException;
-import java.lang.reflect.InvocationTargetException;
-
-
-public class MockLifecycleProvider implements LifecycleProvider
-{
-    private LifecycleProvider processor = new NoInjectionAnnotationLifecycleProvider();
-
-
-    public Object newInstance(String className) throws InstantiationException, NamingException, IllegalAccessException, InvocationTargetException, ClassNotFoundException
-    {
-        return processor.newInstance(className);
-    }
-
-
-    public void destroyInstance(Object instance) throws IllegalAccessException, InvocationTargetException
-    {
-        processor.destroyInstance(instance);
-    }
-
-}
diff --git a/impl/src/test/java/org/apache/myfaces/config/annotation/MockLifecycleProvider2.java b/impl/src/test/java/org/apache/myfaces/config/annotation/MockLifecycleProvider2.java
deleted file mode 100644
index 6f2acbf..0000000
--- a/impl/src/test/java/org/apache/myfaces/config/annotation/MockLifecycleProvider2.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.apache.myfaces.config.annotation;
-
-/*
- * 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.
- */
-
-
-import javax.naming.NamingException;
-import java.lang.reflect.InvocationTargetException;
-
-
-public class MockLifecycleProvider2 implements LifecycleProvider2
-{
-    private LifecycleProvider2 processor = new NoInjectionAnnotationLifecycleProvider();
-
-
-    public Object newInstance(String className) throws InstantiationException, NamingException, IllegalAccessException, InvocationTargetException, ClassNotFoundException
-    {
-        return processor.newInstance(className);
-    }
-
-
-    public void destroyInstance(Object instance) throws IllegalAccessException, InvocationTargetException
-    {
-        processor.destroyInstance(instance);
-    }
-
-
-    public void postConstruct(Object instance) throws IllegalAccessException,
-            InvocationTargetException
-    {
-        processor.postConstruct(instance);
-    }
-}
diff --git a/impl/src/test/java/org/apache/myfaces/config/annotation/OwnAnnotationProcessorTestCase.java b/impl/src/test/java/org/apache/myfaces/config/annotation/OwnAnnotationProcessorTestCase.java
deleted file mode 100644
index f2a1356..0000000
--- a/impl/src/test/java/org/apache/myfaces/config/annotation/OwnAnnotationProcessorTestCase.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package org.apache.myfaces.config.annotation;
-
-/*
- * 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.
- */
-
-import org.apache.myfaces.test.base.AbstractJsfTestCase;
-
-
-public class OwnAnnotationProcessorTestCase extends AbstractJsfTestCase
-{
-    protected LifecycleProvider lifecycleProvider;
-    protected AnnotatedManagedBean managedBean;
-    private static final String TEST_LIFECYCLE_PROVIDER = "org.apache.myfaces.config.annotation.MockLifecycleProvider";
-
-
-    public OwnAnnotationProcessorTestCase(String string)
-    {
-        super(string);
-    }
-
-    public void setUp() throws Exception {
-        super.setUp();
-        LifecycleProviderFactory.getLifecycleProviderFactory(externalContext).release();
-        servletContext.addInitParameter(DefaultLifecycleProviderFactory.LIFECYCLE_PROVIDER, TEST_LIFECYCLE_PROVIDER);
-        lifecycleProvider = LifecycleProviderFactory.getLifecycleProviderFactory().getLifecycleProvider(externalContext);
-        managedBean = new AnnotatedManagedBean();
-
-    }
-
-    public void testOwnProcessor()
-    {
-        assertEquals(TEST_LIFECYCLE_PROVIDER, lifecycleProvider.getClass().getName());
-    }
-}
diff --git a/impl/src/test/java/org/apache/myfaces/test/core/AbstractMyFacesTestCase.java b/impl/src/test/java/org/apache/myfaces/test/core/AbstractMyFacesTestCase.java
index b724ebd..a601e4a 100644
--- a/impl/src/test/java/org/apache/myfaces/test/core/AbstractMyFacesTestCase.java
+++ b/impl/src/test/java/org/apache/myfaces/test/core/AbstractMyFacesTestCase.java
@@ -64,7 +64,6 @@ import javax.servlet.http.HttpServletResponse;
 import org.apache.myfaces.config.ConfigFilesXmlValidationUtils;
 import org.apache.myfaces.config.DefaultFacesConfigurationProvider;
 import org.apache.myfaces.config.RuntimeConfig;
-import org.apache.myfaces.config.annotation.NoInjectionAnnotationLifecycleProvider;
 import org.apache.myfaces.config.element.FacesConfig;
 import org.apache.myfaces.config.impl.element.FactoryImpl;
 import org.apache.myfaces.lifecycle.LifecycleImpl;
@@ -242,8 +241,6 @@ public abstract class AbstractMyFacesTestCase
         servletContext.addInitParameter(ViewHandler.FACELETS_REFRESH_PERIOD_PARAM_NAME,"-1");
         servletContext.addInitParameter("org.apache.myfaces.spi.InjectionProvider", 
             NoInjectionAnnotationInjectionProvider.class.getName());
-        servletContext.addInitParameter("org.apache.myfaces.config.annotation.LifecycleProvider",
-            NoInjectionAnnotationLifecycleProvider.class.getName());
     }
     
     /**
diff --git a/impl/src/test/java/org/apache/myfaces/test/core/runner/AbstractJsfTestContainer.java b/impl/src/test/java/org/apache/myfaces/test/core/runner/AbstractJsfTestContainer.java
index 6a5826d..eb6ed84 100644
--- a/impl/src/test/java/org/apache/myfaces/test/core/runner/AbstractJsfTestContainer.java
+++ b/impl/src/test/java/org/apache/myfaces/test/core/runner/AbstractJsfTestContainer.java
@@ -62,7 +62,6 @@ import javax.servlet.http.HttpServletResponse;
 import org.apache.myfaces.config.ConfigFilesXmlValidationUtils;
 import org.apache.myfaces.config.DefaultFacesConfigurationProvider;
 import org.apache.myfaces.config.RuntimeConfig;
-import org.apache.myfaces.config.annotation.NoInjectionAnnotationLifecycleProvider;
 import org.apache.myfaces.config.element.FacesConfig;
 import org.apache.myfaces.config.impl.element.FactoryImpl;
 import org.apache.myfaces.lifecycle.LifecycleImpl;
@@ -240,9 +239,7 @@ public class AbstractJsfTestContainer
         servletContext.addInitParameter("javax.faces.PROJECT_STAGE", "UnitTest");
         servletContext.addInitParameter("javax.faces.PARTIAL_STATE_SAVING", "true");
         servletContext.addInitParameter(ViewHandler.FACELETS_REFRESH_PERIOD_PARAM_NAME,"-1");
-        servletContext.addInitParameter("org.apache.myfaces.config.annotation.LifecycleProvider",
-            NoInjectionAnnotationLifecycleProvider.class.getName());
-        
+
         TestConfig testConfig = getTestJavaClass().getAnnotation(TestConfig.class);
         if (testConfig != null && testConfig.oamAnnotationScanPackages() != null &&
             testConfig.oamAnnotationScanPackages().length() > 0)
diff --git a/impl/src/test/resources/META-INF/services/org.apache.myfaces.config.annotation.LifecycleProvider b/impl/src/test/resources/META-INF/services/org.apache.myfaces.config.annotation.LifecycleProvider
deleted file mode 100644
index cb4e415..0000000
--- a/impl/src/test/resources/META-INF/services/org.apache.myfaces.config.annotation.LifecycleProvider
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.myfaces.config.annotation.TestDiscoverableLifecycleProvider
\ No newline at end of file
diff --git a/parent/pom.xml b/parent/pom.xml
index 5d79d5a..2968585 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -424,7 +424,7 @@
             </dependency>
 
 
-            <!-- tomcat 7 support (LifecycleProvider) -->
+            <!-- tomcat 7 support (InjectionProvider) -->
             <dependency>
                 <groupId>org.apache.tomcat</groupId>
                 <artifactId>tomcat-catalina</artifactId>
diff --git a/parent/src/site/apt/googleappenginesupport.apt b/parent/src/site/apt/googleappenginesupport.apt
index e112d49..538eb48 100644
--- a/parent/src/site/apt/googleappenginesupport.apt
+++ b/parent/src/site/apt/googleappenginesupport.apt
@@ -57,15 +57,6 @@ Myfaces Core 2.0 on Google App Engine
 +------------------------------------------------------------------------+
       <web-app>
         ...
-                
-        <!-- 
-           We need to set annotation lifecycyle provider manually as org.apache.myfaces.config.annotation.NoInjectionAnnotationLifecycleProvider.
-           Other providers use some classes that are restricted on Google App Engine. 	
-        -->  
-        <context-param>
-            <param-name>org.apache.myfaces.config.annotation.LifecycleProvider</param-name>
-            <param-value>org.apache.myfaces.config.annotation.NoInjectionAnnotationLifecycleProvider</param-value>
-        </context-param>
         
         <!--
             Need to set a secret to avoid javax.crypto.BadPaddingException.
diff --git a/parent/src/site/apt/myfaces2-googleappengine-eclipse-tutorial.apt b/parent/src/site/apt/myfaces2-googleappengine-eclipse-tutorial.apt
index 574963c..6c6f904 100644
--- a/parent/src/site/apt/myfaces2-googleappengine-eclipse-tutorial.apt
+++ b/parent/src/site/apt/myfaces2-googleappengine-eclipse-tutorial.apt
@@ -106,20 +106,6 @@ Tutorial : Configuring MyFaces 2 to run on Google App Engine with Eclipse
 +------------------------------------------------------------------------+
      <web-app ...
              ...
-             <!--
-               We need to set annotation lifecycle provider manually as 
-               org.apache.myfaces.config.annotation.NoInjectionAnnotationLifecycleProvider.
-               Other providers use some classes that are restricted on Google App Engine.    
-            --> 
-            <context-param>
-                <param-name>
-                  org.apache.myfaces.config.annotation.LifecycleProvider
-                </param-name>
-                <param-value>
-                  org.apache.myfaces.config.annotation.NoInjectionAnnotationLifecycleProvider
-                </param-value>
-            </context-param>
-
             <!--
                 Need to set a secret to avoid javax.crypto.BadPaddingException.
                 "param-value" must be Base64 encoded.
diff --git a/parent/src/site/apt/myfaces2-googleappengine-idea-tutorial.apt b/parent/src/site/apt/myfaces2-googleappengine-idea-tutorial.apt
index 2b5e168..73d4192 100644
--- a/parent/src/site/apt/myfaces2-googleappengine-idea-tutorial.apt
+++ b/parent/src/site/apt/myfaces2-googleappengine-idea-tutorial.apt
@@ -148,7 +148,7 @@ Tutorial : Configuring MyFaces 2 to run on Google App Engine with IntelliJ IDEA
 
   [[2]] Now, we will add the MyFaces jars as an "External Library". I did this step to solve 
         compilation problems in my managed beans. Without explicitly adding an External Library, "javax.faces" 
-        namespace is not visible in my managed beans �which we will create in the next steps- even if the jars 
+        namespace is not visible in my managed beans �which we will create in the next steps- even if the jars 
         exist in "WEB-INF/lib". I am sure an experienced IDEA user can solve this problem in a better way.
 
     [[a]] Right-click on the project and select "Module Settings".
@@ -202,7 +202,7 @@ Tutorial : Configuring MyFaces 2 to run on Google App Engine with IntelliJ IDEA
 
 [images/gaetutorial-idea/myfaces2-gae-idea-tut-22-jar-verification.jpg] MyFaces Jar Verification
 
-    [[e]] Put el-api-x.x.jar and el-impl-1.1.jar �which you've downloaded at step 3 of 
+    [[e]] Put el-api-x.x.jar and el-impl-1.1.jar �which you've downloaded at step 3 of 
           "Downloading and Configuration" section- into "WEB-INF/lib".
 
 [images/gaetutorial-idea/myfaces2-gae-idea-tut-23-paste-el-jars.jpg] Paste EL Jars
@@ -215,19 +215,6 @@ Tutorial : Configuring MyFaces 2 to run on Google App Engine with IntelliJ IDEA
 <web-app ...
    ...
    <!--
-      We need to set annotation lifecycle provider manually as org.apache.myfaces.config.annotation.NoInjectionAnnotationLifecycleProvider.
-      Other providers use some classes that are restricted on Google App Engine.    
-   --> 
-   <context-param>
-      <param-name>
-         org.apache.myfaces.config.annotation.LifecycleProvider
-      </param-name>
-      <param-value>
-         org.apache.myfaces.config.annotation.NoInjectionAnnotationLifecycleProvider
-      </param-value>
-   </context-param>
-
-   <!--
       Need to set a secret to avoid javax.crypto.BadPaddingException.
       "param-value" must be Base64 encoded.
       More details: http://wiki.apache.org/myfaces/Secure_Your_Application


Mime
View raw message