Transactions with Message Driven Bean


EJB design: Transactions with Message Driven Bean

  1. Transactions with Message Driven Bean (2 messages)

    Hi All,

    A question was raised During discusions of our Application design and I have to find out this. If we use Container managed transaction with Required attribute in Message Driven Bean, What would be the starting point of transaction. To be specific whether transaction starts when onMessage() method gets called or when message arrives at JMS Q. Any heplp would be appriciated.

  2. Hello,
          There is always a new transaction started or no transaction at all whenever a MDB is called and it depends on the transaction attribute (required or NotSupported for CMT). But you can bring your clients method and the sending of the message in one transaction.

    Hope that helps.

  3. Here is a useful post.