-
1. Re: MDB BMT Redelivery
genman Feb 16, 2007 2:58 PM (in response to jesse_sweetland)My advice to you, having dealt with similar problems myself, would to do one of the following:
1. Use CMT. In the case you want to log and then redeliver, you can simply copy the message and put it back on the queue. Acknowledge the original message.
2. Use CMT. Send a non-transactional message to another JMS queue (say your logging q) and process using a MDB in its own CMT as well. Rollback the original message. -
2. Re: MDB BMT Redelivery
jesse_sweetland Feb 16, 2007 5:25 PM (in response to jesse_sweetland)Thanks for your suggestions. I hadn't thought about setting up a queue purely for logging, but that lead me to another solution. I ended creating a session bean for logging and configuring it for CMT with transaction attribute RequiresNew on all of its methods. I then looked up the session bean from my MDB and invoked the logging methods. Using the session bean allows me to serialize the logging calls so that I know immediately whether they succeeded (and aren't lost on some queue somewhere). It's a little kludgy but it seems to work.