New EJB 2.1 Column on 'The Enhanced Message-Driven' Bean Posted


News: New EJB 2.1 Column on 'The Enhanced Message-Driven' Bean Posted

  1. This column, by Richard Monson-Haefel, covers the new connector-based MDBs (Message-Driven Beans), which allow you to use MDBs with any kind of messaging system, not just JMS. It also covers the activation-configuration properties used in the deployment of MDBs, as well as EJB 2.1's new message-linking facilities.

    Read 'EJB 2.1 - The Enhanced Message-Driven Bean'

    This column wraps up a series of six on the new features of EJB 2.1, starting with an overview that was published in June. At this time Richard is working on the fourth edition of his EJB book, as well as a book on J2EE Web Services, which will be available later next year.

    If you want to be notified when these books come out, you can send an email to
  2. This is way I bought his book, because even though it doesn't cover EJB 2.1, the six articles available do complement the book perfectly, keeping it always up-to-date.
    Also, very well written and complete book.
  3. After reading the article, I must say that I don't understand the consequenses of using Message Linking.

    First I wonder about the threading: If a SessionBean is linked to a MDB sending a JMS message, will the execution of the MDB method then take place in a new thread? And if so, will the thread in the SessionBean then continue its execution (i.e. non blocking) as soon as the MDB thread has started?

    Second I wonder about the transaction model: If, in the example above, the MDB starts an own transaction and it rolls back, will the transaction in the SessionBean roll back as well? This could not work if the call from the SessionBean to the MDB is non blocking as in the example above - in this case the JMS message would just vanish.

    If anyone can encrypt my not so straight forward questions above, I'll be happy for a response.
  4. Sorry, replace encrypt with decrypt.
  5. In the article it mentions that setting a destination type property in the activation spec portion of the deployment descriptor is important for both JMS MDBs and for non-JMS RA MDBs, but since an example is only given for possible values of JMS, it is unclear what kind of values would be expected for an RA based MDB. If it is indeed important to have this for both, it would be nice to expand the sample mail RA MDB descriptor to include this field as well. If anyone has more information on this, please reply to this here and notify me by email: steve_winkler at hotmail dot com