[weld-issues] [JBoss JIRA] Commented: (WELD-824) injection/initializer/observer inheritance broken on Beans registered through BBD.addAnnotatedType()

Jozef Hartinger (JIRA) jira-events at lists.jboss.org
Thu Jan 13 06:21:49 EST 2011


    [ https://issues.jboss.org/browse/WELD-824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12575261#comment-12575261 ] 

Jozef Hartinger commented on WELD-824:
--------------------------------------

I've added another test that tests the same class hierarchy (Foo extends Bar) but both classes are placed in a BDA and an extension prevents (veto()) the Foo class from being recognized as a CDI-managed bean. Although the situation is equal to the former test (CDI beans whose superclass is not a CDI Bean), inherited observers/initializers/injection points do work in this case.

> injection/initializer/observer inheritance broken on Beans registered through BBD.addAnnotatedType()
> ----------------------------------------------------------------------------------------------------
>
>                 Key: WELD-824
>                 URL: https://issues.jboss.org/browse/WELD-824
>             Project: Weld
>          Issue Type: Bug
>          Components: Class Beans (Managed and Session)
>    Affects Versions: 1.1.0.CR4
>            Reporter: Jozef Hartinger
>
> I am having two classes: Foo and Bar where Bar extends Foo. Both these classes are outside of BDA (a jar with no beans.xml placed in WEB-INF/lib of a web app that has beans.xml) The Bar class is registered through a portable Extension (BeforeBeanDiscovery.addAnnotatedType()).
> The problem is that while injection/initializers/event observers defined on the Bar class work as expected, the ones defined on the Foo class are never called. (Note that the Foo class itself is not registered as a Bean - Nevertheless, CDI services should be enabled on Bar's superclasses according to the spec)

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list