站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 j2ee API Documentation 英文版文档

ResourceException (JBoss J2EE API) - JBoss 4.0.1 sp1 j2ee API Documentation 英文版文档


javax.resource
Class ResourceException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjavax.resource.ResourceException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ApplicationServerInternalException, CommException, EISSystemException, IllegalStateException, InvalidPropertyException, LocalTransactionException, NotSupportedException, ResourceAdapterInternalException, ResourceAllocationException, ResourceWarning, SecurityException, SharingViolationException, UnavailableException, WorkException

public class ResourceException
extends Exception

This is the root exception for the exception hierarchy defined for the connector architecture. A ResourceException contains three items, the first two of which are set from the constructor. The first is a standard message string which is accessed via the getMessage() method. The second is an errorCode which is accessed via the getErrorCode() method. The third is a linked exception which provides more information from a lower level in the resource manager. Linked exceptions are accessed via get/setLinkedException.

See Also:
Serialized Form

Constructor Summary
ResourceException()
          Create an exception with a null reason.
ResourceException(String reason)
          Create an exception with a reason.
ResourceException(String reason, String errorCode)
          Create an exception with a reason and an errorCode.
ResourceException(String reason, Throwable throwable)
          Create an exception with a reason and an errorCode.
ResourceException(Throwable throwable)
          Create an exception with a reason and an errorCode.
 
Method Summary
 String getErrorCode()
          Get the error code.
 Exception getLinkedException()
          Get any linked exception.
 void setErrorCode(String errorCode)
          Set the error code.
 void setLinkedException(Exception linkedException)
          Deprecated. use initCause
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceException

public ResourceException()
Create an exception with a null reason.


ResourceException

public ResourceException(String reason)
Create an exception with a reason.

Parameters:
reason - the reason

ResourceException

public ResourceException(String reason,
                         String errorCode)
Create an exception with a reason and an errorCode.

Parameters:
reason - the reason
errorCode - the error code

ResourceException

public ResourceException(String reason,
                         Throwable throwable)
Create an exception with a reason and an errorCode.

Parameters:
reason - the reason
throwable - the linked error

ResourceException

public ResourceException(Throwable throwable)
Create an exception with a reason and an errorCode.

Parameters:
throwable - the linked error
Method Detail

getErrorCode

public String getErrorCode()
Get the error code.

Returns:
the error code

getLinkedException

public Exception getLinkedException()
Get any linked exception.

Returns:
the linked exception

setErrorCode

public void setErrorCode(String errorCode)
Set the error code.


setLinkedException

public void setLinkedException(Exception linkedException)
Deprecated. use initCause

Set a linked exception.

Parameters:
linkedException - the linked exception


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.