Transactions with Message Driven Bean

Discussions

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.

    Thanks
    Madhav
  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.

    Sawan
  3. Here is a useful post.
    http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=70&t=003577