0 Replies Latest reply on Aug 4, 2009 2:40 PM by Xinhua Gu

    Bug or removed feature?

    Xinhua Gu Newbie


      i use @Postconstruct in interceptor like followed:


      public @interface Kleber 
              String value() default "";


      public class KleberInterceptor
              public Object jndiLookup( InvocationContext invocation ) throws Exception

      Unfortunately it not works in Seam 2.2.0.GA. The @PostConstruct methode will nover be invoked.

      After debuging Seam resource codes after something like this:


         private void callPostConstruct()
            final Component component = getComponent();
           if (!component.hasPostConstructMethod())
            InvocationContext context = new RootInvocationContext( bean, component.getPostConstructMethod(), new Object[0] )
               public Object proceed() throws Exception
                  return null;
            invokeAndHandle(context, EventType.POST_CONSTRUCT);

      here Component is the intercepted seam component, if this component doesnot has owned Postconstruct method , invokeAndHandle() will never reached.

      But, the seam document says lifecycle methods will be supported on both component and interceptor...

      so, i would like to ask : if the feature @Postconstruct on intercepter is removed or it is just a bug?