MessageDrivenBeans in a transaction

Discussions

EJB design: MessageDrivenBeans in a transaction

  1. MessageDrivenBeans in a transaction (1 messages)

    Hello All,

    Is there an issue with Message Driven Beans being inside a transaction with JMS?

    Our supplier is telling us that due to a limitation in the EJB 2.0 specification, it is not possible to use MessageDrivenBeans with JMS and MQ series in a transactional context and this is down to a limitation/flaw in the specification.

    Can anyone clarify this? Is it really down to the specification or is it down to MQ Series?

    Thanks.

    Stephen.
  2. MessageDrivenBeans in a transaction[ Go to top ]

    If you use Websphere 4.0 with MQSeries, JMS can be a fully transactional resource. Websphere will even manage a 2PC with JMS and other resources in the same transactions. Websphere does not have MDB yet, but it has something called message beans which are exactly the same as MDB except it is built on top of stateless sessions beans, but with normal onMessage()implementation. The message beans can be transactional or not depending on transaction policy. Whatever happens in the onMessage method (including updating other resources) can be transactional and the container will commit/rollback all resources as appropriate at the end of the method.