[webbeans-issues] [JBoss JIRA] Updated: (WBRI-203) Inherited @PostConstruct on session bean not invoked

Shane Bryzak (JIRA) jira-events at lists.jboss.org
Mon Mar 23 23:58:22 EDT 2009


     [ https://jira.jboss.org/jira/browse/WBRI-203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shane Bryzak updated WBRI-203:
------------------------------

    Description: 
In section 4.2 the spec states:

"Suppose a class X is extended directly or indirectly by the bean class of a simple or session bean Y.
  <snip>
  • If X declares an initializer method, @PostConstruct method or @PreDestroy method x() then Y inherits x() if and
only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x().."

The @PostConstruct method does not seem be be invoked on session beans that extend a superclass with a @PostConstruct method declared.  See TCK test org.jboss.jsr299.tck.tests.implementation.enterprise.lifecycle.EnterpriseBeanLifecycleTest.testIndirectSubClassInheritsPostConstructOnSuperclass()

  was:
In section 4.2 the spec states:

"Suppose a class X is the bean class of a simple or session bean Y declared using XML.
  <snip>
  • If X declares an initializer method, @PostConstruct method or @PreDestroy method x() then Y inherits x(), unless Y
  explicitly declares x() using XML."

The @PostConstruct method does not seem be be invoked on session beans that extend a superclass with a @PostConstruct method declared.  See TCK test org.jboss.jsr299.tck.tests.implementation.enterprise.lifecycle.EnterpriseBeanLifecycleTest.testIndirectSubClassInheritsPostConstructOnSuperclass()



Quoted wrong part of spec.. fixed.

> Inherited @PostConstruct on session bean not invoked
> ----------------------------------------------------
>
>                 Key: WBRI-203
>                 URL: https://jira.jboss.org/jira/browse/WBRI-203
>             Project: Web Beans
>          Issue Type: Bug
>    Affects Versions: 1.0.0.BETA1
>            Reporter: Shane Bryzak
>
> In section 4.2 the spec states:
> "Suppose a class X is extended directly or indirectly by the bean class of a simple or session bean Y.
>   <snip>
>   • If X declares an initializer method, @PostConstruct method or @PreDestroy method x() then Y inherits x() if and
> only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x().."
> The @PostConstruct method does not seem be be invoked on session beans that extend a superclass with a @PostConstruct method declared.  See TCK test org.jboss.jsr299.tck.tests.implementation.enterprise.lifecycle.EnterpriseBeanLifecycleTest.testIndirectSubClassInheritsPostConstructOnSuperclass()

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       




More information about the weld-issues mailing list