2 Replies Latest reply on Jan 27, 2006 2:36 PM by Bill Burke

    Message Driven POJO and Exceptions

    Chris Baxter Newbie

      I'm using a Message Driven POJO and it calls a Stateless Session Bean (in a loop). The SLSB method that is called from the MD POJO is set up as REQUIRES_NEW for transactionality. Each call to that method should occur in it's own isolated transaction, and failures and rollbacks should not have any effect on the other calls. What I'm finding is that if any call to that method fails and causes a rollback, the initial message that was sent to the MD POJO is re-delivered every time. This is extremely undesireable because it re-performs the same process again, duplicating all of the transactions that did not fail.

      It seems that if any downstream bean (downstream from the MD POJO) causes a transaction rollback, no matter how far downstream and no matter if it is appropriately caught in the MD POJO, the message gets re-delivered. Is there any way to prevent this? I've tried different transaction annotations on the MD POJO but nothing works.