If you are getting an exception while sending a message inside an MDB
during failover:
* if you are running in a container managed (or bean managed)
transaction and get exception, you should ignore the errors (if any).
The transaction the MDB is running in will handle the failure. By this I
mean:
- any messages you already went will be rolled back
- the entire transaction will be rolled back
- the MDB will be triggered again and send the messages
* If you are *not* running using with any type of transaction, the
message that was being sent when the exception was triggered may or may
not have received the message. You can resend (probably setting the
redeliver property) and risk duplicate messages or not send and risk a
message being lost.
-- Linda
glassfish_at_javadesktop.org wrote:
> Hi all,
>
> we are currently doing some test with the OpenMQ failover. We have two Glassfish nodes which each have their OpenMQ broker in REMOTE mode. With a stand-alone program we are sending 100 messages to a persistent queue where an MDB listens to. The MDB sends the message on to another queue. While the sending of the 100 msgs to the MDB is in progress we stop the broker that is used. Now there are a lot of Exceptions but once the failover process is done we see that not all messages were delivered.
> How should I react on such Exceptions? Should I try to resend the messages again? We found some examples of how stand-alone JMS clients should handle these incidents but what should I do in an MDB? Should the container take care of the transaction handling itself? Or do I have to do something special?
> Any help or pointing to a guide would be greatly appreciated.
>
> Thanks in advance,
> Chris.
> [Message sent by forum member 'chrjohn' (chrjohn)]
>
> http://forums.java.net/jive/thread.jspa?messageID=358122
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>