[cdi-dev] [JBoss JIRA] (CDI-746) PBA should be fired just after PAT and not after PIP or PIT

Romain Manni-Bucau (Jira) issues at jboss.org
Tue Jun 9 08:24:33 EDT 2020


    [ https://issues.redhat.com/browse/CDI-746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14146070#comment-14146070 ] 

Romain Manni-Bucau commented on CDI-746:
----------------------------------------

[~manovotn] I agree both cases "can" exist but since I never saw one of both I priviledge the other (once again, if you have some examples of this being wrong I could revise my position and try to find another solution).

 

Issue I have is more when the extension adds things cause it collected data to do so but then (after the collect) the bean is veto so the extension still do something (adds a new bean) whereas it shouldn't do anything and modify the bean set of the CDI context. Think to MP-Config, a way to impl it is to capture all ConfigProperty injections and add a bean for all these types. If in between a bean containing some of these injections is veto (and it was the only one with these types) then the extension will wrongly add these types/beans. Same with alternative regard (which can only be resolved after PBA) if not done early. In some cases the impact is only memory, in some other, the runtime is just wrong (if types are used for runtime, it is typically the case).

> PBA should be fired just after PAT and not after PIP or PIT
> -----------------------------------------------------------
>
>                 Key: CDI-746
>                 URL: https://issues.redhat.com/browse/CDI-746
>             Project: CDI Specification Issues
>          Issue Type: Bug
>          Components: Portable Extensions
>    Affects Versions: 2.0.SP1
>            Reporter: Romain Manni-Bucau
>            Priority: Major
>
> Today spec put PBA after PIP and PIT which leads to have orphan events for PIP and PIT and thefore register wrong beans in portable extensions if PBA is veto.
> Luckily today PBA is not that used but we should ensure vetos happen before any other events to ease work for extension author (didn't see any extension checking the information captured are no more relevant today so this affects pretty much all extensions + it breaks extension and alternative support in most cases).
> Proposal is to move up the PBA event after PAT one enabling a straight forward extension API instead of a very complex one for meta capture today.



--
This message was sent by Atlassian Jira
(v7.13.8#713008)



More information about the cdi-dev mailing list