[weld-issues] [JBoss JIRA] Closed: (WELD-705) Changes made to a superclass's AnnotatedType by extensions not taken into account while sending ProcessAnnotatedType events pertaining to the subclass

Pete Muir (JIRA) jira-events at lists.jboss.org
Sun Dec 12 05:11:52 EST 2010


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

Pete Muir closed WELD-705.
--------------------------

      Assignee: Pete Muir
    Resolution: Done


> Changes made to a superclass's AnnotatedType by extensions not taken into account while sending ProcessAnnotatedType events pertaining to the subclass
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WELD-705
>                 URL: https://issues.jboss.org/browse/WELD-705
>             Project: Weld
>          Issue Type: Bug
>          Components: Bootstrap and Metamodel API, GlassFish Integration
>    Affects Versions: 1.1.0.Beta1
>         Environment: Jersey extension in GlassFish faces this issue
>            Reporter: Sivakumar Thyagarajan
>            Assignee: Pete Muir
>            Priority: Minor
>              Labels: extension, glassfish, jersey
>             Fix For: 1.1.0.CR1
>
>         Attachments: WebApplication1.tgz, WebApplication3.tgz
>
>
> It appears that Weld does not take into account changes made to a superclass's AnnotatedType by extensions, when sending ProcessAnnotatedType events pertaining to the subclass. 
> Please find attached a netbeans project that demonstrates the problem. It is a web app containing a CDI extension that patches the annotated types it sees to remove all their fields.
> BeanOne has one field:
>     @Inject BeanManager beanManager;
> BeanTwo extends BeanOne and doesn't add any fields.
> There are no other injection points. The portable extensions patches the annotated type for BeanOne and removes the BeanManager injection point. However on execution,  this output appears in the server log: (all the diagnostic output is at warning level...)
> ===
> WARNING: Handling BeforeBeanDiscovery event
> WARNING: Handling ProcessAnnotatedType event for beans.BeanOne
> WARNING:   type has 0 fields
> WARNING:   replaced annotated type for class beans.BeanOne
> WARNING: Handling ProcessAnnotatedType event for beans.BeanTwo
> WARNING:   type has 0 fields
> WARNING:   replaced annotated type for class beans.BeanTwo
> WARNING: Handling ProcessManagedBean event for beans.BeanTwo
> WARNING:   found injection point interface javax.enterprise.inject.spi.BeanManager @javax.enterprise.inject.Default()
> WARNING: Handling ProcessManagedBean event for beans.BeanOne
> ===
> I.e. in BeanOne the field has been correctly nuked, but it comes back in BeanTwo.
> Weld may be holding a reference to the old AnnotatedType for BeanOne as part of its internal representation for BeanTwo and uses that instead of the replacement provided by the extension. Since annotated types are self-contained, so Weld should not even look at BeanOne at that point.
> The same behavior can be observed on both GF 3.0.1 (=WELD-000900 1.0.1 (SP3)) and GF 3.1-b16 (=WELD-000900 1.1.0.01 (glassfish)).
> A glassfish issue tracking this Jersey extension problem is at https://glassfish.dev.java.net/issues/show_bug.cgi?id=13132

-- 
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