Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdi-dev] What is the purpose of @Priority on Producers?

In this https://jakartaee.github.io/cdi/2024/02/27/whats-new-in-cdi41.html, there is a new feature in CDI 4.1 that adds @ Priority to producers. 

For example, if the same interface with different implement, we can identify them with qualifiers. Two producers for this case with @ Priority is meaningless.

And the beans instantation ordering can be detected by the dependencies. 

Is there a simple example to demonstrate it resolves the current issue?


---

Regards,

Hantsy Bai

Self-employed consultant, fullstack developer, agile coach, freelancer/remote worker

GitHub: https://github.com/hantsy

Twitter: https://twitter.com/@hantsy

Medium: https://medium.com/@hantsy

Back to the top