Top Description Fields Constructors Methods
javax.jms

public Class JMSException

extends Exception
Class Inheritance
Known Direct Subclasses
javax.jms.JMSSecurityException, javax.jms.MessageEOFException, javax.jms.MessageFormatException, javax.jms.MessageNotReadableException, javax.jms.MessageNotWriteableException, javax.jms.IllegalStateException, javax.jms.InvalidClientIDException, javax.jms.InvalidDestinationException, javax.jms.InvalidSelectorException, javax.jms.ResourceAllocationException, javax.jms.TransactionInProgressException, javax.jms.TransactionRolledBackException

This is the root class of all checked exceptions in the JMS API.

It provides the following information:

Since
JMS 1.0
Version
JMS 2.0

Field Summary

Modifier and TypeField and Description
private String
errorCode

Vendor-specific error code.

private Exception
linkedException

Exception reference.

private static final long
serialVersionUID

Hides java.lang.Exception.serialVersionUID.

Explicitly set serialVersionUID to be the same as the implicit serialVersionUID of the JMS 1.1 version

Constructor Summary

AccessConstructor and Description
public
JMSException(String
a description of the exception
reason
,
String
a string specifying the vendor-specific error code
errorCode
)

Constructs a JMSException with the specified reason and error code.

public
JMSException(String
a description of the exception
reason
)

Constructs a JMSException with the specified reason and with the error code defaulting to null.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

a string specifying the vendor-specific error code
getErrorCode
()

Gets the vendor-specific error code.

public Exception

Returns:

the linked Exception, null if none
getLinkedException
()

Gets the exception linked to this one.

public void
setLinkedException(Exception
the linked Exception
ex
)

Adds a linked Exception.

Field Detail

errorCodeback to summary
private String errorCode

Vendor-specific error code.

linkedExceptionback to summary
private Exception linkedException

Exception reference.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.Exception.serialVersionUID.

Explicitly set serialVersionUID to be the same as the implicit serialVersionUID of the JMS 1.1 version

Constructor Detail

JMSExceptionback to summary
public JMSException(String reason, String errorCode)

Constructs a JMSException with the specified reason and error code.

Parameters
reason:String

a description of the exception

errorCode:String

a string specifying the vendor-specific error code

JMSExceptionback to summary
public JMSException(String reason)

Constructs a JMSException with the specified reason and with the error code defaulting to null.

Parameters
reason:String

a description of the exception

Method Detail

getErrorCodeback to summary
public String getErrorCode()

Gets the vendor-specific error code.

Returns:String

a string specifying the vendor-specific error code

getLinkedExceptionback to summary
public Exception getLinkedException()

Gets the exception linked to this one.

Returns:Exception

the linked Exception, null if none

setLinkedExceptionback to summary
public void setLinkedException(Exception ex)

Adds a linked Exception.

Parameters
ex:Exception

the linked Exception