当前页面:
在线文档首页 >
Java Platform, Enterprise Edition v1.3.1 API Specifications
Java 2 Platform EE v1.3: Class ResourceException - Java Platform, Enterprise Edition v1.3.1 API Specifications
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:
- A resource adapter vendor specific string describing the error.
This string is a standard Java exception message and is available
through getMessage() method.
- resource adapter vendor specific error code
- reference to another exception. Often a resource exception
will be result of a lower level problem. If appropriate, this
lower level exception can be linked to the ResourceException.
- 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 |
ResourceException
public ResourceException(java.lang.String reason,
java.lang.String errorCode)
- Create a ResourceException.
- Parameters:
reason
- a description of the exceptionerrorCode
- 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
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