public abstract class

JmsException

extends NestedRuntimeException
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ org.springframework.core.NestedRuntimeException
           ↳ org.springframework.jms.JmsException
Known Direct Subclasses

Class Overview

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

Summary

Public Constructors
JmsException(String msg)
Constructor that takes a message.
JmsException(String msg, Throwable cause)
Constructor that takes a message and a root cause.
JmsException(Throwable cause)
Constructor that takes a plain root cause, intended for subclasses mirroring corresponding javax.jms exceptions.
Public Methods
String getErrorCode()
Convenience method to get the vendor specific error code if the root cause was an instance of JMSException.
String getMessage()
Return the detail message, including the message from the linked exception if there is one.
[Expand]
Inherited Methods
From class org.springframework.core.NestedRuntimeException
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public JmsException (String msg)

Constructor that takes a message.

Parameters
msg the detail message

public JmsException (String msg, Throwable cause)

Constructor that takes 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 javax.jms.JMSException, but can also be a JNDI NamingException or the like.

public JmsException (Throwable cause)

Constructor that takes a plain root cause, intended for subclasses mirroring corresponding javax.jms exceptions.

Parameters
cause the cause of the exception. This argument is generally expected to be a proper subclass of javax.jms.JMSException.

Public Methods

public 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, or null

public String getMessage ()

Return the detail message, including the message from the linked exception if there is one.

See Also
  • javax.jms.JMSException#getLinkedException()