A Detailed Understanding CDI Conversations in Java EE 6


News: A Detailed Understanding CDI Conversations in Java EE 6

  1. In the previous articles in the series, we discussed basic dependency injection, scoping, producers/disposers, component naming, interceptors, decorators, stereotypes and events. In this article we will discuss CDI Conversations in detail. In future articles, we will cover details of using CDI with JSF, portable extensions, available implementations as well as CDI alignment with Seam, Spring and Guice. We will augment the discussion with a few implementation details using CanDI, Caucho’s independent implementation of JSR 299 included in the open source Resin application server.


    Previous Articles in this Series

    Dependency Injection in Java EE 6: Part I
    Dependency Injection in Java EE 6: Part II
    Dependency Injection in Java EE 6: Part III 

    Books on EJB 3 and EJB 3.1 Development

    EJB 3 in Action by Reza Rahman
    Enterprise JavaBeans 3.1 ~ Andrew Lee Rubinger
    Beginning EJB 3 Application Development ~ Raghu R. Kodali
    Pro EJB 3: Java Persistence API ~ Mike Keith

  2. Thanks to a few fellow theserverside.com readers who pointed out a problem in the link. The program keeps appending the word 'report' or 'news' before the word tip in the URL for some reason? Anyways, I've fixed it. That's the second time I've seen that happen, so I'll be sure to double-check for that in the future.




    It should be updated in the body of the posting as well.

  3. Very nice! Been looking forward to this and Reza seems to be quite a good writer really.

    CDI is really getting interesting, especially considering this is a 1.0 version. I'm intrigued by the direction Rezma hints at that all this stuff is going.

    Java development sure has gotten interesting again. Now, only, where is JBoss AS 6 ;)


  4. Augustientje,

    Thanks for the kind words. This one had a little more than the intended gap due to some of the understandable delay with the new site. The next article should be up in the next few weeks as a consequence.

    I believe JBoss 6 is due for final release sometime in Summer, as is Resin (GlassFish of course, is already out). We are actively gathering ideas for Java EE 7, so any input is welcome.



  5. EJB 3.1 in action[ Go to top ]

    Hey Reza,

    I know this has been asked many times before. When is the EJB 3.1 in action coming :-)

  6. EJB 3.1 in action[ Go to top ]


    It is targeted for publication by early next year. Due to the number of things both Debu and I have been engaged in, we had to start the second edition late. The JBoss folks will get the O'Rielly book out by this year I think though. We will try to get preview chapters out as soon as we are done with them. We also intend to make this edition a lot more open with plently of community feedback. For example, we are trying to convince Manning to open up the worrking Table of Contents for anyone to comment on. Tentatively, we are covering EJB 3.1, CDI and JPA 2. In the meanwhile of course, my EJB 3.1 preview series on TSS is still out there and is pretty accurate. There is also the Java EE 6 tutorial from the Sun folks...

    Thanks for asking,


  7. CDI is the de-facto API for comprehensive next-generation type-safe dependency injection


    How can CDI be the de-facto API if it's so new? In my view, de-facto standard can only be something widely used. Such statements only make an impressions of a blah-blah, even if the matter itself is worth considering.

  8. Al,

    Aren't you being just a little silly here? Here is what the actual full sentence reads: "Standardized via JSR 299, CDI is the de-facto API for comprehensive next-generation type-safe dependency injection as well as robust context management for Java EE." That says nothing of what you consider to be "de-facto" outside of a strictly Java EE standard-based viewpoint.

    Let's please stay away from such cheap drivel and focus on more important things such as what CDI actually offers the community. It seems you ommitted the "for Java EE" part of the sentence to deliberately try and pick a needless fight that doesn't really help anyone...



  9. > Aren't you being just a little silly here?

    I think I'm not


    > Here is what the actual full sentence reads: "Standardized via JSR 299, CDI is

    > the de-facto API for comprehensive next-generation ...

    You might look up the meaning of the word "de-facto" in a dictionary.


    Please don't get me wrong: I think CDI is a very nice thing, I like its concepts etc. I just think that describing it as the "de-facto API" is not correct. In a couple of years maybe, but not yet. And if a statement in an article is not credible then the whole article may seem not credible. I'd just replace "de-facto" with "standard". Or just with "" (yes, an empty string).

  10. Great article Reza;



  11. Gurkan,

    Thanks for the kind words...