Novell exteNd Messaging Platform 5.2

com.sssw.jms.api
Class JMQMessageNotDeliveredException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjavax.jms.JMSException
              extended bycom.sssw.jms.api.JMQMessageNotDeliveredException
All Implemented Interfaces:
Serializable

public class JMQMessageNotDeliveredException
extends JMSException

This exception is raised if a MessageListener's onMessage method continously raises an un-checked exception. Users should check for this exception when JMS calls the connection's ExceptionListener:

 public void onException(JMSException ex)
 {
     if (ex instanceof JMQMessageNotDeliveredException)
     {
         JMQMessageNotDeliveredException mnde =
             (JMQMessageNotDeliveredException) ex;
         Message message = mnde.getJMSMessage();
         // deal with message...

         System.out.println("onMessage raised: " +
             ex.getLinkedException());
     }
     else ...
 }
 

Since:
jBroker MQ 1.3
See Also:
Serialized Form

Constructor Summary
JMQMessageNotDeliveredException(String reason, Message message)
          Construct a JMQMessageNotDeliveredException with reason and with error code defaulting to null.
JMQMessageNotDeliveredException(String reason, String errCode, Message message)
          Construct a JMQMessageNotDeliveredException with reason and errorCode for exception.
 
Method Summary
 Message getJMSMessage()
          Get the message, which could not be delivered.
 
Methods inherited from class javax.jms.JMSException
getErrorCode, getLinkedException, setLinkedException
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JMQMessageNotDeliveredException

public JMQMessageNotDeliveredException(String reason,
                                       Message message)
Construct a JMQMessageNotDeliveredException with reason and with error code defaulting to null.

Parameters:
reason - a description of the exception.

JMQMessageNotDeliveredException

public JMQMessageNotDeliveredException(String reason,
                                       String errCode,
                                       Message message)
Construct a JMQMessageNotDeliveredException with reason and errorCode for exception.

Parameters:
reason - a description of the exception.
errCode - a string specifying the vendor specific error code.
Method Detail

getJMSMessage

public Message getJMSMessage()
Get the message, which could not be delivered.

Returns:
a message which could not be delivered successfully via the MessageListener's onMessage method.

Novell exteNd Messaging Platform 5.2

exteNd is a registered trademark of Novell, Inc.
Copyright 1998-2004 Novell, Inc. All Rights Reserved.