A single TX for message consumption and CRUD operation
consider the following scenario?
message producer inserts message into a queue (MQ queue, or a TIBCO JMS Server), MDB running on WebSphere application server consumes the message, parses it and calls a stateless session EJB , which in turn inserts it into the DB.
Can the message consumption (by MDB) and DB insert (by session bean) be part of the same transaction? Meaning, if the DB insert fails, the rollback would result in the message remaining in the queue, so another MDB instance would pick it up.