Posted: Sat Oct 16, 2004 1:23 pm Post subject: jms failure - what to do with message?
Voyager
Joined: 07 Jan 2004 Posts: 75
question:
if a MDB picks up messages from an IBM MQ native queue and processes them and passes the object/data to other components writing to database ect...
what if something happens and an error occurs and it was never written to the DB, how could you then get the message back.
has anyone dealt with a scenario such as this?
do you make a copy of the message and hold it on another queue until you get confirmation that the message was received and written to the DB successfully?
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
It sounds like you need to use container managed transactions (ie, get your message in a transaction) and use a two-phase commit to make your database update. If you have problems, you can rollback and get the message redelivered.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum