当前页面:
在线文档首页 >
Java Platform, Enterprise Edition v1.3.1 API Specifications
Java 2 Platform EE v1.3: Class LocalTransactionException - Java Platform, Enterprise Edition v1.3.1 API Specifications
javax.resource.spi
Class LocalTransactionException
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--javax.resource.ResourceException
|
+--javax.resource.spi.LocalTransactionException
- All Implemented Interfaces:
- java.io.Serializable
- public class LocalTransactionException
- extends ResourceException
A LocalTransactionException represents various error conditions related
to the local transaction management contract. The JTA specification
specifies the javax.transaction.xa.XAException class for exceptions
related to XAResource based transaction management contract.
The LocalTransactionException is used for the local transaction
management contract to indicate the following common error conditions:
- invalid transaction context when a transaction operation is executed.
For example, calling LocalTransaction.commit method without an active
local transaction is an error condition
- transaction is rolled back instead of getting committed in the
LocalTransaction.commit method.
- attempt to start a local transaction from the same thread on a
ManagedConnection that is already associated with an active local
transaction
- any resource adapter or resource manager specific error conditions
related to local transaction management. Examples are violation of
integrity of resources, deadlock detection, communication failure
during transaction completion, retry required or any internal error
in a resource manager.
- See Also:
- Serialized Form
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 |
LocalTransactionException
public LocalTransactionException(java.lang.String reason,
java.lang.String errorCode)
- Create a LocalTransactionException.
- Parameters:
reason
- a description of the exceptionerrorCode
- a string specifying the vendor specific
error code
LocalTransactionException
public LocalTransactionException(java.lang.String reason)
- Create a LocalTransactionException with reason.
- Parameters:
reason
- a description of the exception