EJB programming & troubleshooting: JMSException

  1. JMSException (1 messages)

    public void onMessage(Message message)
      TextMessage txtMsg = (TextMessage) message;
        String myText = txtMsg.getText();
        System.out.println(" Message is : " + myText);
        //do more processing
      catch(JMSException ex)
         //handle JMS exception here

    Referring to the sample code above, if Line "//do more processing" throws a RuntimeException, what is the effect on the client that sent the message?
    The message will be sent?

    Threaded Messages (1)

  2. RE:JMSException[ Go to top ]

    It all depends on if you are using CMT(container managed transaction).Assuming CMT,
    Container rollsback the Transaction incase of such exceptions and places message back in the place(Destination) where it got the message from.

    So, client who sent the message is more or less not impacted - i would say.