public void onMessage(Message message)
{
TextMessage txtMsg = (TextMessage) message;
try
{
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?
-
JMSException (1 messages)
- Posted by: alin alin
- Posted on: November 14 2005 04:50 EST
Threaded Messages (1)
- RE:JMSException by ranji c on November 14 2005 11:55 EST
-
RE:JMSException[ Go to top ]
- Posted by: ranji c
- Posted on: November 14 2005 11:55 EST
- in response to alin alin
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.