You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ta...@apache.org on 2020/11/02 10:03:56 UTC

[myfaces] branch master updated: Jakarta Faces 4.0 - Removed ManagedBean system

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 568abd0  Jakarta Faces 4.0 - Removed ManagedBean system
568abd0 is described below

commit 568abd06646dbdecfe02975f6a19ea53c541a31c
Author: Thomas Andraschko <ta...@apache.org>
AuthorDate: Mon Nov 2 11:03:46 2020 +0100

    Jakarta Faces 4.0 - Removed ManagedBean system
---
 .../java/jakarta/faces/bean/ApplicationScoped.java |  37 -------
 .../main/java/jakarta/faces/bean/CustomScoped.java |  36 -------
 .../main/java/jakarta/faces/bean/ManagedBean.java  |  45 --------
 .../java/jakarta/faces/bean/ManagedProperty.java   |  42 --------
 .../main/java/jakarta/faces/bean/NoneScoped.java   |  36 -------
 .../java/jakarta/faces/bean/ReferencedBean.java    |  36 -------
 .../java/jakarta/faces/bean/RequestScoped.java     |  36 -------
 .../java/jakarta/faces/bean/SessionScoped.java     |  36 -------
 .../main/java/jakarta/faces/bean/ViewScoped.java   |  36 -------
 .../main/java/jakarta/faces/bean/package-info.java |  20 ----
 .../apache/myfaces/bean/ManagedBeanExtension.java  | 100 ------------------
 .../apache/myfaces/bean/ManagedBeanWrapper.java    | 115 ---------------------
 .../myfaces/bean/ManagedPropertyExtension.java     |  70 -------------
 .../bean/literal/ApplicationScopedLiteral.java     |  30 ------
 .../bean/literal/DependentScopeLiteral.java        |  30 ------
 .../apache/myfaces/bean/literal/NamedLiteral.java  |  43 --------
 .../myfaces/bean/literal/RequestScopedLiteral.java |  30 ------
 .../myfaces/bean/literal/SessionScopedLiteral.java |  30 ------
 .../jakarta.enterprise.inject.spi.Extension        |   2 -
 .../myfaces/resource/web-facesconfig_4_0.xsd       |  65 ------------
 .../config/FacesConfigValidatorTestCase.java       |  10 --
 21 files changed, 885 deletions(-)

diff --git a/api/src/main/java/jakarta/faces/bean/ApplicationScoped.java b/api/src/main/java/jakarta/faces/bean/ApplicationScoped.java
deleted file mode 100644
index 5b0db73..0000000
--- a/api/src/main/java/jakarta/faces/bean/ApplicationScoped.java
+++ /dev/null
@@ -1,37 +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 jakarta.faces.bean;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * 
- * @since 2.0
- */
-@Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
-@Target(ElementType.TYPE)
-@Inherited
-@Deprecated
-public @interface ApplicationScoped
-{
-
-}
diff --git a/api/src/main/java/jakarta/faces/bean/CustomScoped.java b/api/src/main/java/jakarta/faces/bean/CustomScoped.java
deleted file mode 100644
index e9c2c5f..0000000
--- a/api/src/main/java/jakarta/faces/bean/CustomScoped.java
+++ /dev/null
@@ -1,36 +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 jakarta.faces.bean;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * @since 2.0
- */
-@Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
-@Target(ElementType.TYPE)
-@Inherited
-@Deprecated
-public @interface CustomScoped
-{
-    public String value();
-}
diff --git a/api/src/main/java/jakarta/faces/bean/ManagedBean.java b/api/src/main/java/jakarta/faces/bean/ManagedBean.java
deleted file mode 100644
index 86683fc..0000000
--- a/api/src/main/java/jakarta/faces/bean/ManagedBean.java
+++ /dev/null
@@ -1,45 +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 jakarta.faces.bean;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * @since 2.0
- */
-@Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
-@Target(ElementType.TYPE)
-@Inherited
-@Deprecated
-public @interface ManagedBean
-{
-    /**
-     * Taken to be the value of the eager attribute of the managed-bean.
-     */
-    public boolean eager() default false;
-
-    /**
-     * Taken to be the managed-bean-name. See class documentation for details.
-     */
-    public String name() default "";
-
-}
diff --git a/api/src/main/java/jakarta/faces/bean/ManagedProperty.java b/api/src/main/java/jakarta/faces/bean/ManagedProperty.java
deleted file mode 100644
index a466188..0000000
--- a/api/src/main/java/jakarta/faces/bean/ManagedProperty.java
+++ /dev/null
@@ -1,42 +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 jakarta.faces.bean;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * @since 2.0
- */
-@Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
-@Target(ElementType.FIELD)
-@Deprecated
-public @interface ManagedProperty
-{
-    /**
-     * Taken to be the managed-property-name.
-     */
-    public String name() default "";
-    
-    /**
-     * Taken to be the value that is injected into the field.
-     */
-    public String value();
-}
diff --git a/api/src/main/java/jakarta/faces/bean/NoneScoped.java b/api/src/main/java/jakarta/faces/bean/NoneScoped.java
deleted file mode 100644
index 99e8b04..0000000
--- a/api/src/main/java/jakarta/faces/bean/NoneScoped.java
+++ /dev/null
@@ -1,36 +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 jakarta.faces.bean;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * @since 2.0
- */
-@Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
-@Target(ElementType.TYPE)
-@Inherited
-@Deprecated
-public @interface NoneScoped
-{
-
-}
diff --git a/api/src/main/java/jakarta/faces/bean/ReferencedBean.java b/api/src/main/java/jakarta/faces/bean/ReferencedBean.java
deleted file mode 100644
index 007f429..0000000
--- a/api/src/main/java/jakarta/faces/bean/ReferencedBean.java
+++ /dev/null
@@ -1,36 +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 jakarta.faces.bean;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * @since 2.0
- */
-@Retention(java.lang.annotation.RetentionPolicy.CLASS)
-@Target(ElementType.TYPE)
-@Inherited
-@Deprecated
-public @interface ReferencedBean
-{
-    public String name() default "";
-}
diff --git a/api/src/main/java/jakarta/faces/bean/RequestScoped.java b/api/src/main/java/jakarta/faces/bean/RequestScoped.java
deleted file mode 100644
index 9a0d042..0000000
--- a/api/src/main/java/jakarta/faces/bean/RequestScoped.java
+++ /dev/null
@@ -1,36 +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 jakarta.faces.bean;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * @since 2.0
- */
-@Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
-@Target(ElementType.TYPE)
-@Inherited
-@Deprecated
-public @interface RequestScoped
-{
-
-}
diff --git a/api/src/main/java/jakarta/faces/bean/SessionScoped.java b/api/src/main/java/jakarta/faces/bean/SessionScoped.java
deleted file mode 100644
index e18f448..0000000
--- a/api/src/main/java/jakarta/faces/bean/SessionScoped.java
+++ /dev/null
@@ -1,36 +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 jakarta.faces.bean;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * @since 2.0
- */
-@Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
-@Target(ElementType.TYPE)
-@Inherited
-@Deprecated
-public @interface SessionScoped
-{
-
-}
diff --git a/api/src/main/java/jakarta/faces/bean/ViewScoped.java b/api/src/main/java/jakarta/faces/bean/ViewScoped.java
deleted file mode 100644
index 4f36194..0000000
--- a/api/src/main/java/jakarta/faces/bean/ViewScoped.java
+++ /dev/null
@@ -1,36 +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 jakarta.faces.bean;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * @since 2.0
- */
-@Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
-@Target(ElementType.TYPE)
-@Inherited
-@Deprecated // the spec says it's deprecated, but it IS actually still very useful!
-public @interface ViewScoped
-{
-
-}
diff --git a/api/src/main/java/jakarta/faces/bean/package-info.java b/api/src/main/java/jakarta/faces/bean/package-info.java
deleted file mode 100644
index 09509c2..0000000
--- a/api/src/main/java/jakarta/faces/bean/package-info.java
+++ /dev/null
@@ -1,20 +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.
- */
-@Deprecated
-package jakarta.faces.bean;
\ No newline at end of file
diff --git a/impl/src/main/java/org/apache/myfaces/bean/ManagedBeanExtension.java b/impl/src/main/java/org/apache/myfaces/bean/ManagedBeanExtension.java
deleted file mode 100644
index 67d705b..0000000
--- a/impl/src/main/java/org/apache/myfaces/bean/ManagedBeanExtension.java
+++ /dev/null
@@ -1,100 +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.bean;
-
-import jakarta.enterprise.event.Observes;
-import jakarta.enterprise.inject.spi.Extension;
-import jakarta.enterprise.inject.spi.ProcessAnnotatedType;
-import java.lang.annotation.Annotation;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.logging.Logger;
-import jakarta.enterprise.util.AnnotationLiteral;
-import org.apache.myfaces.bean.literal.ApplicationScopedLiteral;
-import org.apache.myfaces.bean.literal.DependentScopeLiteral;
-import org.apache.myfaces.bean.literal.RequestScopedLiteral;
-import org.apache.myfaces.bean.literal.SessionScopedLiteral;
-import org.apache.myfaces.cdi.view.ViewScopedLiteral;
-
-public class ManagedBeanExtension implements Extension
-{
-    private static final Logger LOGGER = Logger.getLogger(ManagedBeanExtension.class.getName());
-
-    private Map<Class<? extends Annotation>, Class<? extends Annotation>> mappings = new HashMap<>();
-    private Map<Class<? extends Annotation>, AnnotationLiteral> literals = new HashMap<>();
-
-    public ManagedBeanExtension()
-    {
-        mappings.put(jakarta.faces.bean.ApplicationScoped.class,
-                jakarta.enterprise.context.ApplicationScoped.class);
-        mappings.put(jakarta.faces.bean.SessionScoped.class,
-                jakarta.enterprise.context.SessionScoped.class);
-        mappings.put(jakarta.faces.bean.RequestScoped.class,
-                jakarta.enterprise.context.RequestScoped.class);
-        mappings.put(jakarta.faces.bean.NoneScoped.class,
-                jakarta.enterprise.context.Dependent.class);
-        mappings.put(jakarta.faces.bean.ViewScoped.class,
-                jakarta.faces.view.ViewScoped.class);
-        
-        literals.put(jakarta.enterprise.context.ApplicationScoped.class,
-                new ApplicationScopedLiteral());
-        literals.put(jakarta.enterprise.context.SessionScoped.class,
-                new SessionScopedLiteral());
-        literals.put(jakarta.enterprise.context.RequestScoped.class,
-                new RequestScopedLiteral());
-        literals.put(jakarta.enterprise.context.Dependent.class,
-                new DependentScopeLiteral());
-        literals.put(jakarta.faces.view.ViewScoped.class,
-                new ViewScopedLiteral());
-    }
-
-    protected void convertJsf2Scopes(@Observes ProcessAnnotatedType pat)
-    {
-        Class<?> clazz = pat.getAnnotatedType().getJavaClass();
-
-        jakarta.faces.bean.ManagedBean managedBean = clazz.getAnnotation(jakarta.faces.bean.ManagedBean.class);
-        if (managedBean != null)
-        {
-            Class<? extends Annotation> oldScope = resolveScope(pat);
-            if (oldScope != null)
-            {
-                Class<? extends Annotation> newScope = mappings.get(oldScope);
-                
-                LOGGER.info("@ManagedBean (" + clazz.getName() + ") was converted to a CDI bean with scope: "
-                        + oldScope.getName());
-
-                pat.setAnnotatedType(
-                        new ManagedBeanWrapper(pat.getAnnotatedType(), managedBean,
-                                newScope, oldScope, literals.get(newScope)));
-            }
-        }
-    }
-
-    private Class<? extends Annotation> resolveScope(ProcessAnnotatedType pat)
-    {
-        for (Class<? extends Annotation> oldScope : mappings.keySet())
-        {
-            if (pat.getAnnotatedType().getJavaClass().isAnnotationPresent(oldScope))
-            {
-                return oldScope;
-            }
-        }
-        return null;
-    }
-}
diff --git a/impl/src/main/java/org/apache/myfaces/bean/ManagedBeanWrapper.java b/impl/src/main/java/org/apache/myfaces/bean/ManagedBeanWrapper.java
deleted file mode 100644
index 5d32d9d..0000000
--- a/impl/src/main/java/org/apache/myfaces/bean/ManagedBeanWrapper.java
+++ /dev/null
@@ -1,115 +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.bean;
-
-import jakarta.enterprise.inject.spi.AnnotatedType;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import jakarta.enterprise.util.AnnotationLiteral;
-import jakarta.inject.Named;
-import org.apache.myfaces.bean.literal.NamedLiteral;
-
-class ManagedBeanWrapper implements AnnotatedType<Object>
-{
-    private final AnnotatedType wrapped;
-    private Map<Class<? extends Annotation>, Annotation> annotations;
-    private Set<Annotation> annotationSet;
-
-    ManagedBeanWrapper(AnnotatedType wrapped,
-                    jakarta.faces.bean.ManagedBean managedBean,
-                    Class<? extends Annotation> newScope,
-                    Class<? extends Annotation> oldScope,
-                    AnnotationLiteral literal)
-    {
-        this.wrapped = wrapped;
-
-        this.annotations = new HashMap<>(wrapped.getAnnotations().size());
-        this.annotations.put(newScope, literal);
-        this.annotations.put(Named.class, new NamedLiteral(managedBean.name()));
-
-        for (Annotation originalAnnotation : wrapped.getAnnotations())
-        {
-            if (!originalAnnotation.annotationType().equals(oldScope)
-                    && !originalAnnotation.annotationType().equals(jakarta.faces.bean.ManagedBean.class))
-            {
-                this.annotations.put(originalAnnotation.annotationType(), originalAnnotation);
-            }
-        }
-
-        this.annotationSet = new HashSet<>(this.annotations.values());
-    }
-
-    @Override
-    public Class getJavaClass()
-    {
-        return wrapped.getJavaClass();
-    }
-
-    @Override
-    public Set getConstructors()
-    {
-        return wrapped.getConstructors();
-    }
-
-    @Override
-    public Set getMethods()
-    {
-        return wrapped.getMethods();
-    }
-
-    @Override
-    public Set getFields()
-    {
-        return wrapped.getFields();
-    }
-
-    @Override
-    public Type getBaseType()
-    {
-        return wrapped.getBaseType();
-    }
-
-    @Override
-    public Set<Type> getTypeClosure()
-    {
-        return wrapped.getTypeClosure();
-    }
-
-    @Override
-    public <T extends Annotation> T getAnnotation(Class<T> targetClass)
-    {
-        return (T) this.annotations.get(targetClass);
-    }
-
-    @Override
-    public Set<Annotation> getAnnotations()
-    {
-        return this.annotationSet;
-    }
-
-    @Override
-    public boolean isAnnotationPresent(Class<? extends Annotation> targetClass)
-    {
-        return this.annotations.containsKey(targetClass);
-    }
-}
diff --git a/impl/src/main/java/org/apache/myfaces/bean/ManagedPropertyExtension.java b/impl/src/main/java/org/apache/myfaces/bean/ManagedPropertyExtension.java
deleted file mode 100644
index d9c0bb0..0000000
--- a/impl/src/main/java/org/apache/myfaces/bean/ManagedPropertyExtension.java
+++ /dev/null
@@ -1,70 +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.bean;
-
-import java.lang.reflect.Type;
-import java.util.HashSet;
-import java.util.Set;
-import jakarta.enterprise.event.Observes;
-import jakarta.enterprise.inject.spi.AfterBeanDiscovery;
-import jakarta.enterprise.inject.spi.AfterDeploymentValidation;
-import jakarta.enterprise.inject.spi.Annotated;
-import jakarta.enterprise.inject.spi.AnnotatedField;
-import jakarta.enterprise.inject.spi.BeanManager;
-import jakarta.enterprise.inject.spi.Extension;
-import jakarta.enterprise.inject.spi.ProcessManagedBean;
-import jakarta.faces.bean.ManagedProperty;
-import org.apache.myfaces.cdi.managedproperty.ManagedPropertyInfo;
-import org.apache.myfaces.cdi.managedproperty.ManagedPropertyProducer;
-
-public class ManagedPropertyExtension implements Extension
-{
-    private Set<ManagedPropertyInfo> types = new HashSet<>();
-
-    public <T> void collect(@Observes ProcessManagedBean<T> event)
-    {
-        for (AnnotatedField<?> field : event.getAnnotatedBeanClass().getFields())
-        {
-            addAnnotatedTypeIfNecessary(field);
-        }
-    }
-    
-    private void addAnnotatedTypeIfNecessary(Annotated annotated)
-    {
-        if (annotated.isAnnotationPresent(ManagedProperty.class))
-        {
-            Type type = annotated.getBaseType();
-
-            types.add(new ManagedPropertyInfo(type, annotated.getAnnotation(ManagedProperty.class).value()));
-        }
-    }
-    
-    public void afterBean(@Observes AfterBeanDiscovery afterBeanDiscovery, BeanManager beanManager)
-    {
-        for (ManagedPropertyInfo typeInfo : types)
-        {
-            afterBeanDiscovery.addBean(new ManagedPropertyProducer(beanManager, typeInfo));
-        }
-    }
-    
-    public void cleanup(@Observes AfterDeploymentValidation afterDeploymentValidation)
-    {
-        types.clear();
-    }
-}
diff --git a/impl/src/main/java/org/apache/myfaces/bean/literal/ApplicationScopedLiteral.java b/impl/src/main/java/org/apache/myfaces/bean/literal/ApplicationScopedLiteral.java
deleted file mode 100644
index 7b3624a..0000000
--- a/impl/src/main/java/org/apache/myfaces/bean/literal/ApplicationScopedLiteral.java
+++ /dev/null
@@ -1,30 +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.bean.literal;
-
-import jakarta.enterprise.context.ApplicationScoped;
-import jakarta.enterprise.util.AnnotationLiteral;
-
-/**
- * Literal for {@link ApplicationScoped}
- */
-public class ApplicationScopedLiteral extends AnnotationLiteral<ApplicationScoped> implements ApplicationScoped
-{
-    private static final long serialVersionUID = 6582580975876369665L;
-}
diff --git a/impl/src/main/java/org/apache/myfaces/bean/literal/DependentScopeLiteral.java b/impl/src/main/java/org/apache/myfaces/bean/literal/DependentScopeLiteral.java
deleted file mode 100644
index afd76ca..0000000
--- a/impl/src/main/java/org/apache/myfaces/bean/literal/DependentScopeLiteral.java
+++ /dev/null
@@ -1,30 +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.bean.literal;
-
-import jakarta.enterprise.context.Dependent;
-import jakarta.enterprise.util.AnnotationLiteral;
-
-/**
- * Literal for {@link Dependent}
- */
-public class DependentScopeLiteral extends AnnotationLiteral<Dependent> implements Dependent
-{
-    private static final long serialVersionUID = -7408316864366401212L;
-}
diff --git a/impl/src/main/java/org/apache/myfaces/bean/literal/NamedLiteral.java b/impl/src/main/java/org/apache/myfaces/bean/literal/NamedLiteral.java
deleted file mode 100644
index 112a64b..0000000
--- a/impl/src/main/java/org/apache/myfaces/bean/literal/NamedLiteral.java
+++ /dev/null
@@ -1,43 +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.bean.literal;
-
-import jakarta.enterprise.util.AnnotationLiteral;
-import jakarta.inject.Named;
-
-/**
- * Literal for {@link Named}
- */
-public class NamedLiteral extends AnnotationLiteral<Named> implements Named
-{
-    private static final long serialVersionUID = -1508316823366401212L;
-
-    private final String value;
-    
-    public NamedLiteral(String value)
-    {
-        this.value = value;
-    }
-
-    @Override
-    public String value()
-    {
-        return value;
-    }
-}
diff --git a/impl/src/main/java/org/apache/myfaces/bean/literal/RequestScopedLiteral.java b/impl/src/main/java/org/apache/myfaces/bean/literal/RequestScopedLiteral.java
deleted file mode 100644
index 375bf27..0000000
--- a/impl/src/main/java/org/apache/myfaces/bean/literal/RequestScopedLiteral.java
+++ /dev/null
@@ -1,30 +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.bean.literal;
-
-import jakarta.enterprise.context.RequestScoped;
-import jakarta.enterprise.util.AnnotationLiteral;
-
-/**
- * Literal for {@link RequestScoped}
- */
-public class RequestScopedLiteral extends AnnotationLiteral<RequestScoped> implements RequestScoped
-{
-    private static final long serialVersionUID = -6365776352042023537L;
-}
diff --git a/impl/src/main/java/org/apache/myfaces/bean/literal/SessionScopedLiteral.java b/impl/src/main/java/org/apache/myfaces/bean/literal/SessionScopedLiteral.java
deleted file mode 100644
index 690ad46..0000000
--- a/impl/src/main/java/org/apache/myfaces/bean/literal/SessionScopedLiteral.java
+++ /dev/null
@@ -1,30 +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.bean.literal;
-
-import jakarta.enterprise.context.SessionScoped;
-import jakarta.enterprise.util.AnnotationLiteral;
-
-/**
- * Literal for {@link SessionScoped}
- */
-public class SessionScopedLiteral extends AnnotationLiteral<SessionScoped> implements SessionScoped
-{
-    private static final long serialVersionUID = -1425877068082208121L;
-}
diff --git a/impl/src/main/resources/META-INF/services/jakarta.enterprise.inject.spi.Extension b/impl/src/main/resources/META-INF/services/jakarta.enterprise.inject.spi.Extension
index 323a1b7..9ef7c01 100644
--- a/impl/src/main/resources/META-INF/services/jakarta.enterprise.inject.spi.Extension
+++ b/impl/src/main/resources/META-INF/services/jakarta.enterprise.inject.spi.Extension
@@ -10,5 +10,3 @@ org.apache.myfaces.config.annotation.CdiAnnotationProviderExtension
 org.apache.myfaces.push.cdi.PushContextCDIExtension
 org.apache.myfaces.flow.cdi.FlowBuilderExtension
 org.apache.myfaces.flow.cdi.FlowScopeExtension
-org.apache.myfaces.bean.ManagedBeanExtension
-org.apache.myfaces.bean.ManagedPropertyExtension
diff --git a/impl/src/main/resources/org/apache/myfaces/resource/web-facesconfig_4_0.xsd b/impl/src/main/resources/org/apache/myfaces/resource/web-facesconfig_4_0.xsd
index f905acd..c254d93 100644
--- a/impl/src/main/resources/org/apache/myfaces/resource/web-facesconfig_4_0.xsd
+++ b/impl/src/main/resources/org/apache/myfaces/resource/web-facesconfig_4_0.xsd
@@ -48,10 +48,6 @@
             <xsd:selector xpath="jakartaee:validator"/>
             <xsd:field xpath="jakartaee:validator-id"/>
         </xsd:unique>
-        <xsd:unique name="faces-config-managed-bean-name-uniqueness">
-            <xsd:selector xpath="jakartaee:managed-bean"/>
-            <xsd:field xpath="jakartaee:managed-bean-name"/>
-        </xsd:unique>
     </xsd:element>
 
     <xsd:complexType name="faces-configType">
@@ -62,13 +58,11 @@
             <xsd:element name="factory" type="jakartaee:faces-config-factoryType"/>
             <xsd:element name="component" type="jakartaee:faces-config-componentType"/>
             <xsd:element name="converter" type="jakartaee:faces-config-converterType"/>
-            <xsd:element name="managed-bean" type="jakartaee:faces-config-managed-beanType"/>
             <xsd:element name="flow-definition" type="jakartaee:faces-config-flow-definitionType"/>
             <xsd:element name="name" type="jakartaee:java-identifierType" minOccurs="0"/>
             <xsd:element name="navigation-rule" type="jakartaee:faces-config-navigation-ruleType"/>
             <xsd:element name="protected-views" type="jakartaee:faces-config-protected-viewsType"
                 minOccurs="0" maxOccurs="unbounded"/>
-            <xsd:element name="referenced-bean" type="jakartaee:faces-config-referenced-beanType"/>
             <xsd:element name="render-kit" type="jakartaee:faces-config-render-kitType"/>
             <xsd:element name="lifecycle" type="jakartaee:faces-config-lifecycleType"/>
             <xsd:element name="validator" type="jakartaee:faces-config-validatorType"/>
@@ -365,56 +359,6 @@
         <xsd:attribute name="id" type="xsd:ID"/>
     </xsd:complexType>
 
-    <xsd:complexType name="faces-config-managed-beanType">
-        <xsd:sequence>
-            <xsd:group ref="jakartaee:descriptionGroup"/>
-            <xsd:element name="managed-bean-name" type="jakartaee:java-identifierType"/>
-            <xsd:element name="managed-bean-class" type="jakartaee:fully-qualified-classType"/>
-            <xsd:element name="managed-bean-scope"
-                type="jakartaee:faces-config-managed-bean-scopeOrNoneType"/>
-            <xsd:choice>
-                <xsd:element maxOccurs="unbounded" minOccurs="0" name="managed-property"
-                    type="jakartaee:faces-config-managed-propertyType"/>
-                <xsd:element name="map-entries" type="jakartaee:faces-config-map-entriesType"/>
-                <xsd:element name="list-entries" type="jakartaee:faces-config-list-entriesType"/>
-            </xsd:choice>
-            <xsd:element maxOccurs="unbounded" minOccurs="0" name="managed-bean-extension"
-                type="jakartaee:faces-config-managed-bean-extensionType"/>
-        </xsd:sequence>
-        <xsd:attribute name="id" type="xsd:ID"/>
-        <xsd:attribute name="eager" type="xsd:boolean" use="optional"/>
-    </xsd:complexType>
-
-    <xsd:complexType name="faces-config-managed-bean-extensionType">
-        <xsd:sequence>
-            <xsd:any maxOccurs="unbounded" minOccurs="0" namespace="##any" processContents="lax"/>
-        </xsd:sequence>
-        <xsd:attribute name="id" type="xsd:ID"/>
-    </xsd:complexType>
-
-    <xsd:complexType name="faces-config-managed-bean-scopeOrNoneType">
-        <xsd:simpleContent>
-            <xsd:restriction base="jakartaee:string">
-                <xsd:pattern value="view|request|session|application|none|#\{.*\}"/>
-            </xsd:restriction>
-        </xsd:simpleContent>
-    </xsd:complexType>
-
-    <xsd:complexType name="faces-config-managed-propertyType">
-        <xsd:sequence>
-            <xsd:group ref="jakartaee:descriptionGroup"/>
-            <xsd:element name="property-name" type="jakartaee:string"/>
-            <xsd:element minOccurs="0" name="property-class" type="jakartaee:java-typeType"/>
-            <xsd:choice>
-                <xsd:element name="map-entries" type="jakartaee:faces-config-map-entriesType"/>
-                <xsd:element name="null-value" type="jakartaee:faces-config-null-valueType"/>
-                <xsd:element name="value" type="jakartaee:faces-config-valueType"/>
-                <xsd:element name="list-entries" type="jakartaee:faces-config-list-entriesType"/>
-            </xsd:choice>
-        </xsd:sequence>
-        <xsd:attribute name="id" type="xsd:ID"/>
-    </xsd:complexType>
-
     <xsd:complexType name="faces-config-flow-definitionType">
         <xsd:sequence>
             <xsd:group ref="jakartaee:descriptionGroup"/>
@@ -671,15 +615,6 @@
         <xsd:attribute name="id" type="xsd:ID"/>
     </xsd:complexType>
 
-    <xsd:complexType name="faces-config-referenced-beanType">
-        <xsd:sequence>
-            <xsd:group ref="jakartaee:descriptionGroup"/>
-            <xsd:element name="referenced-bean-name" type="jakartaee:java-identifierType"/>
-            <xsd:element name="referenced-bean-class" type="jakartaee:fully-qualified-classType"/>
-        </xsd:sequence>
-        <xsd:attribute name="id" type="xsd:ID"/>
-    </xsd:complexType>
-
     <xsd:complexType name="faces-config-render-kitType">
         <xsd:sequence>
             <xsd:group ref="jakartaee:descriptionGroup"/>
diff --git a/impl/src/test/java/org/apache/myfaces/config/FacesConfigValidatorTestCase.java b/impl/src/test/java/org/apache/myfaces/config/FacesConfigValidatorTestCase.java
index 3b3daaf..d92251b 100644
--- a/impl/src/test/java/org/apache/myfaces/config/FacesConfigValidatorTestCase.java
+++ b/impl/src/test/java/org/apache/myfaces/config/FacesConfigValidatorTestCase.java
@@ -77,15 +77,5 @@ public class FacesConfigValidatorTestCase extends AbstractJsfTestCase
             "        <to-view-id>/doesNotExist2.jsp</to-view-id>" +
             "    </navigation-case>" +
             "</navigation-rule>" +
-            "<managed-bean>" +
-            "    <managed-bean-name>exist</managed-bean-name>" +
-            "    <managed-bean-class>org.apache.myfaces.config.FacesConfigValidatorTestCase</managed-bean-class>" +
-            "    <managed-bean-scope>request</managed-bean-scope>" +
-            "</managed-bean>" +
-            "<managed-bean>" +
-            "    <managed-bean-name>nonExist</managed-bean-name>" +
-            "    <managed-bean-class>org.apache.myfaces.config.NonExist</managed-bean-class>" +
-            "    <managed-bean-scope>request</managed-bean-scope>" +
-            "</managed-bean>" +
        "</faces-config>";
 }