Like other EJBs, message-driven beans make use of the EJB container's transaction service. Because message-driven beans never directly interact with clients, they never participate in the client's transaction.
Message-driven EJBs offer three different transaction options:
Required transaction attribute
If the Required attribute is specified, the EJB container automatically starts a transaction. The message receipt from the JMS queue or topic is included in this transaction. The message-driven bean's onMessage method is then called in the transaction context. When the onMessage method returns, the EJB container commits the transaction. ...