Pro CDI 2 in Java EE 8
- Author: Arjan Tijms, Jan Beernink
- ISBN: 1484243625
- Year: 2019
- Pages: 247
- Language: English
- File size: 2.4 MB
- File format: PDF, ePub
- Category: Java
In Pro CDI 2 in Java EE 8, utilize CDI and the CDI 2.0 to automatically handle the life cycle of your enterprise Java, Java EE, or Jakarta EE application’s beans using predefined scopes and specify custom life cycles using scopes. In this publication, you may see how it is possible to execute dynamic and asynchronous communication between separate beans in your application with CDI occasions.
The authors explain how to incorporate new abilities to the CDI platform by implementing these capabilities as extensions. They show you how you can utilize CDI in a Java SE environment with the newest CDI initialization and setup API, and how to dynamically modify the configuration of legumes at program startup by using dynamic bean building.
This book is compatible with the newest open-source Eclipse Jakarta EE platform and applications.
What You Will Learn
- Utilize qualifier annotations to inject particular bean implementations
- Programmatically retrieve bean instances from the CDI container at both Java SE and Java EE when injecting them to an item isn’t possible
- Dynamically replace beans using the @Alternative annotation to, as an example, substitute a bean with a mock model for analyzing
- Use annotation literals for instances of annotations to use with the CDI API
- Discover how scopes and occasions socialize
Who This Book Is For
People who have some experience with CDI, but may not have experience with a few of the more innovative features in CDI.