javax.resource
Class ResourceException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--javax.resource.ResourceException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ApplicationServerInternalException, CommException, EISSystemException, IllegalStateException, LocalTransactionException, NotSupportedException, ResourceAdapterInternalException, ResourceAllocationException, ResourceWarning, SecurityException

public class ResourceException
extends java.lang.Exception

This is the root interface of the exception hierarchy defined for the Connector architecture. The ResourceException provides the following information:

See Also:
Serialized Form

Constructor Summary
ResourceException(java.lang.String reason)
          Create a ResourceException with reason.
ResourceException(java.lang.String reason, java.lang.String errorCode)
          Create a ResourceException.
 
Method Summary
 java.lang.String getErrorCode()
          Get the vendor specific error code
 java.lang.Exception getLinkedException()
          Get the exception linked to this ResourceException
 void setLinkedException(java.lang.Exception ex)
          Add a linked Exception to this ResourceException.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceException

public ResourceException(java.lang.String reason,
                         java.lang.String errorCode)
Create a ResourceException.
Parameters:
reason - a description of the exception
errorCode - a string specifying the vendor specific error code

ResourceException

public ResourceException(java.lang.String reason)
Create a ResourceException with reason.
Parameters:
reason - a description of the exception
Method Detail

getErrorCode

public java.lang.String getErrorCode()
Get the vendor specific error code
Returns:
a string specifying the vendor specific error code

getLinkedException

public java.lang.Exception getLinkedException()
Get the exception linked to this ResourceException
Returns:
linked Exception, null if none

setLinkedException

public void setLinkedException(java.lang.Exception ex)
Add a linked Exception to this ResourceException.
Parameters:
ex - linked Exception