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

Matěj Novotný (Jira) issues at jboss.org
Tue Jun 9 06:08:19 EDT 2020


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

Matěj Novotný commented on CDI-746:
-----------------------------------

To provide full background, there is  CDITCK-590 and the discussion in it.

And there is a CDI TCK test asserting current ordering, see [this|https://github.com/eclipse-ee4j/cdi-tck/blob/master/impl/src/main/java/org/jboss/cdi/tck/tests/extensions/beanDiscovery/event/ordering/LifecycleEventOrderingTest.java]. This change would break backwards compatibility.

 

Personally, I am -1 on changing this. I don't see much use in having two follow-up events that both offer veto option when nothing really changes in between. OTOH if you leave it as it is, it allows you or other extensions to change things around in PIP and PIT and after that you can decide in PBA (based on updated state perhaps) whether you want to veto it or not. Therefore, I don't see those events as "orphaned".

> 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