1 Reply Latest reply on Jan 9, 2013 9:32 AM by lucaster

    [seam-security] DefinitionException WELD-000805 when @SecurityBindingType in a class that overrides a superclass' @PostConstruct

    lucaster

      When I deploy a sample project with the following classes in it, I get this at deploy time:

      org.jboss.weld.exceptions.DefinitionException: WELD-000805 Cannot have more than one post construct method annotated with @PostConstruct for public@Named class org.lucaster.sandbox.problem.weld000805.controller.ConcreteBean

       

      Here is the code:

       

      public abstract class AbstractBean {

       

          @PostConstruct

          public void postConstruct() {

       

          }

      }

       

      @Named

      public class ConcreteBean extends AbstractBean {

       

          @Boom

          public void discord() {}

       

          @Override

          @PostConstruct

          public void postConstruct() {

       

          }

       

      }

       

      @SecurityBindingType

      @Retention(RetentionPolicy.RUNTIME)

      @Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})

      public @interface Boom {

       

      }

       

      public class Authorizer {

       

          @Secures

          @Boom

          public boolean isOk() {

              return true;

          }

      }

       

      Is this a bug?