Java Reference
In-Depth Information
Any instance of the bean that utilizes a producer method or field, disposer method or field, or
observer method invocation can service only that invocation.
Any injections of the bean into method parameters of disposer or observer methods exist to
service that method invocation only.
Going back to the example that was previously demonstrated using the @New qualifier, the same results can be
achieved using the following code:
public class Order (){
@Produces @ConversationScoped
Order getOrder(Order order){
The CDI specification contains a plethora of beneficial information, and that is because this technology encompasses
a plethora of capability. Utilizing what CDI has to offer can increase developer productivity and make an application
more robust. CDI is a complex API that can take some time to get your head around, but once you take the time to
learn it, the benefits will pay off.
CDI 1.0 was full of new concepts and techniques that had been brought forward from the Weld project into
Java EE. It changed the way that Java EE developers create enterprise applications. The first release of CDI was
revolutionary for Java EE. .The latest release continues to build upon the groundbreaking features that were
introduced in Java EE 6. This chapter covered only the tip of the iceberg, so please do not stop here if this chapter
introduced you to CDI; embrace it and empower your applications.
Search WWH ::

Custom Search