Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-322

Scopes declared by a subclass should override the scope declared by its superclass

    Details

      Description

      The following situation:

      @RequestScoped class Foo {}
      @Dependent class Bar extends Foo {}

      results in this:

      Exception in thread "main" org.jboss.weld.DefinitionException: WELD-000046 At most one scope may be specified on class Class [@Alternative, @Dependent, @RequestScoped]...
      at org.jboss.weld.bean.AbstractClassBean.initScopeType(AbstractClassBean.java:297)
      at org.jboss.weld.bean.AbstractBean.initialize(AbstractBean.java:147)
      at org.jboss.weld.bean.AbstractClassBean.initialize(AbstractClassBean.java:146)
      at org.jboss.weld.bean.ManagedBean.initialize(ManagedBean.java:199)
      at org.jboss.weld.bootstrap.AbstractBeanDeployer.deploy(AbstractBeanDeployer.java:111)
      at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:151)
      at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:367)
      at org.jboss.weld.environment.se.StartMain.go(StartMain.java:73)
      at org.jboss.weld.environment.se.StartMain.main(StartMain.java:89)

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                pmuir Pete Muir
                Reporter:
                gavin.king Gavin King
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: