org.springframework.jms
Class JmsException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byorg.springframework.core.NestedRuntimeException
                  extended byorg.springframework.jms.JmsException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DestinationResolutionException, IllegalStateException, InvalidClientIDException, InvalidDestinationException, InvalidSelectorException, JmsSecurityException, MessageConversionException, MessageEOFException, MessageFormatException, MessageNotReadableException, MessageNotWriteableException, ResourceAllocationException, TransactionInProgressException, TransactionRolledBackException, UncategorizedJmsException

public abstract class JmsException
extends NestedRuntimeException

Base class for exception thrown by the framework whenever it encounters a problem related to JMS.

Since:
1.1
Author:
Les Hazlewood, Juergen Hoeller
See Also:
Serialized Form

Constructor Summary
  JmsException(java.lang.String msg)
          Constructor that takes a message.
  JmsException(java.lang.String msg, java.lang.Throwable cause)
          Constructor that allows a message and a root cause.
protected JmsException(java.lang.Throwable cause)
          Constructor that allows a plain root cause, intended for subclasses mirroring respective javax.jms exceptions.
 
Method Summary
 java.lang.String getErrorCode()
          Convenience method to get the vendor specific error code if the root cause was an instance of JMSException.
 
Methods inherited from class org.springframework.core.NestedRuntimeException
getCause, getMessage, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JmsException

public JmsException(java.lang.String msg)
Constructor that takes a message.

Parameters:
msg - the detail message

JmsException

public JmsException(java.lang.String msg,
                    java.lang.Throwable cause)
Constructor that allows a message and a root cause.

Parameters:
msg - the detail message
cause - the cause of the exception. This argument is generally expected to be a proper subclass of JMSException, but can also be a JNDI NamingException or the like.

JmsException

protected JmsException(java.lang.Throwable cause)
Constructor that allows a plain root cause, intended for subclasses mirroring respective javax.jms exceptions.

Parameters:
cause - the cause of the exception. This argument is generally expected to be a proper subclass of JMSException.
Method Detail

getErrorCode

public java.lang.String getErrorCode()
Convenience method to get the vendor specific error code if the root cause was an instance of JMSException.

Returns:
a string specifying the vendor-specific error code if the root cause is an instance of JMSException. Otherwise return text indicating the root cause was not an instance of JMSException.


Copyright (C) 2003-2004 The Spring Framework Project.