Top Description Fields Constructors Methods
jakarta.resource

public Class ResourceException

extends Exception
Class Inheritance
Known Direct Subclasses
jakarta.resource.cci.ResourceWarning, jakarta.resource.spi.ApplicationServerInternalException, jakarta.resource.spi.CommException, jakarta.resource.spi.EISSystemException, jakarta.resource.spi.IllegalStateException, jakarta.resource.spi.InvalidPropertyException, jakarta.resource.spi.LocalTransactionException, jakarta.resource.spi.ResourceAdapterInternalException, jakarta.resource.spi.ResourceAllocationException, jakarta.resource.spi.SecurityException, jakarta.resource.spi.SharingViolationException, jakarta.resource.spi.UnavailableException, jakarta.resource.spi.work.WorkException, jakarta.resource.NotSupportedException

This is the root interface of the exception hierarchy defined for Jakarta™ Connectors. The ResourceException provides the following information:
Authors
Rahul Sharma, Ram Jeyaraman
Version
1.0

Field Summary

Modifier and TypeField and Description
private String
errorCode

Vendor specific error code

private Exception
linkedException

reference to another exception

Constructor Summary

AccessConstructor and Description
public
ResourceException()

Constructs a new instance with null as its detail message.

public
ResourceException(String
the detail message.
message
)

Constructs a new instance with the specified detail message.

public
ResourceException(Throwable
a chained exception of type Throwable.
cause
)

Constructs a new throwable with the specified cause.

public
ResourceException(String
the detail message.
message
,
Throwable
a chained exception of type Throwable.
cause
)

Constructs a new throwable with the specified detail message and cause.

public
ResourceException(String
a description of the exception.
message
,
String
a string specifying the vendor specific error code.
errorCode
)

Create a new throwable with the specified message and error code.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the error code.
getErrorCode
()

Get the error code.

public Exception

Returns:

linked Exception, null if none
getLinkedException
()
Deprecated J2SE release 1.4 supports a chained exception facility that allows any throwable to know about another throwable, if any, that caused it to get thrown.

Get the exception linked to this ResourceException

public String

Returns:

a detailed message string.
getMessage
()

Overrides java.lang.Throwable.getMessage.

Returns a detailed message string describing this exception.

public void
setErrorCode(String
the error code.
errorCode
)

Set the error code.

public void
setLinkedException(Exception
linked Exception
ex
)
Deprecated J2SE release 1.4 supports a chained exception facility that allows any throwable to know about another throwable, if any, that caused it to get thrown.

Add a linked Exception to this ResourceException.

Field Detail

errorCodeback to summary
private String errorCode

Vendor specific error code

linkedExceptionback to summary
private Exception linkedException

reference to another exception

Constructor Detail

ResourceExceptionback to summary
public ResourceException()

Constructs a new instance with null as its detail message.

ResourceExceptionback to summary
public ResourceException(String message)

Constructs a new instance with the specified detail message.

Parameters
message:String

the detail message.

ResourceExceptionback to summary
public ResourceException(Throwable cause)

Constructs a new throwable with the specified cause.

Parameters
cause:Throwable

a chained exception of type Throwable.

ResourceExceptionback to summary
public ResourceException(String message, Throwable cause)

Constructs a new throwable with the specified detail message and cause.

Parameters
message:String

the detail message.

cause:Throwable

a chained exception of type Throwable.

ResourceExceptionback to summary
public ResourceException(String message, String errorCode)

Create a new throwable with the specified message and error code.

Parameters
message:String

a description of the exception.

errorCode:String

a string specifying the vendor specific error code.

Method Detail

getErrorCodeback to summary
public String getErrorCode()

Get the error code.

Returns:String

the error code.

getLinkedExceptionback to summary
public Exception getLinkedException()

Deprecated

J2SE release 1.4 supports a chained exception facility that allows any throwable to know about another throwable, if any, that caused it to get thrown. Refer to getCause and initCause methods of the java.lang.Throwable class..

Get the exception linked to this ResourceException

Returns:Exception

linked Exception, null if none

getMessageback to summary
public String getMessage()

Overrides java.lang.Throwable.getMessage.

Returns a detailed message string describing this exception.

Returns:String

a detailed message string.

setErrorCodeback to summary
public void setErrorCode(String errorCode)

Set the error code.

Parameters
errorCode:String

the error code.

setLinkedExceptionback to summary
public void setLinkedException(Exception ex)

Deprecated

J2SE release 1.4 supports a chained exception facility that allows any throwable to know about another throwable, if any, that caused it to get thrown. Refer to getCause and initCause methods of the java.lang.Throwable class.

Add a linked Exception to this ResourceException.

Parameters
ex:Exception

linked Exception