6 Replies Latest reply on Jul 28, 2005 8:14 AM by cweaver

    Rollback affects both Hypersonic database and Oracle

    cweaver

      I have a MDB that calls several methods in an EJB(CMP) that has a transaction with an oracle database. The MDB of course is linked to hypersonic (until I find a reason to remove it).

      Problem : As it stands now if everything in the EJB commits successfully then there is no problem however if the EJB issues a rollback it not only rollsback the transaction to Oracle but also the hypersonic queue info. Then the MDB still thinks it has a message to proccess. In addition to this if the first call to the EJB fails(rollsback) then every other call will fail.

      Solution that I tried:
      I tried to make all the EJB methods that are called to require new transactions however when it enters the EJB method it seems like it just sits there waiting for a new transaction which it never gets. Then it dies, rollsback and reattempts to proccess the message which causes a tight loop. Very BAD.

      How can I accomplish my goal of rolling back changes within the CMP method if something fails but committing other successful calls to that same CMP method and committing to hypersonic that I have proccessed the message.