javax.transaction.Transaction翻译
来源:互联网 发布:网络摄像机 刷机 编辑:程序博客网 时间:2024/05/29 11:07
Overview Package Class Tree Deprecated Index Help JavaTM 2 Platform
Ent. Ed. v1.4 PREV CLASS NEXT CLASSFRAMES NO FRAMES All Classes SUMMARY: NESTED | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD
javax.transaction
Method Summary
Complete the transaction represented by this Transaction object. 完成Transaction对象表示的事务。
Disassociate the resource specified from the transaction associated with the target Transaction object. 解除与目标Transaction对象关联的事务指定的资源关联。
Enlist the resource specified with the transaction associated with the target Transaction object. 加入与目标Transaction对象关联的事务指定的资源。
Obtain the status of the transaction associated with the target Transaction object. 获取与目标Transaction对象关联的事务状态。
Register a synchronization object for the transaction currently associated with the target object. 为目前与目标对象关联的事务注册一个同步对象。
Rollback the transaction represented by this Transaction object. 回滚Transaction对象表示的事务。
Modify the transaction associated with the target object such that the only possible outcome of the transaction is to roll back the transaction. 修改当前线程的关联事务,使得事务的唯一可能结果是回滚该事务。 Method Detail
Overview Package Class Tree Deprecated Index Help JavaTM 2 Platform
Ent. Ed. v1.4 PREV CLASS NEXT CLASSFRAMES NO FRAMES All Classes SUMMARY: NESTED | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD
Submit a bug or feature
Ent. Ed. v1.4 PREV CLASS NEXT CLASSFRAMES NO FRAMES All Classes SUMMARY: NESTED | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD
javax.transaction
Interface Transaction
- public interface Transaction
The Transaction interface allows operations to be performed against the transaction in the target Transaction object. A Transaction object is created corresponding to each global transaction creation. The Transaction object can be used for resource enlistment, synchronization registration, transaction completion, and status query operations. Transaction接口允许操作执行基于目标Transaction对象的事务。创建一个Transaction对象 符合每一个全局事务创建。Transaction对象可以用于资源征集、同步注册、事务完成和状态查询操作。
Method Summary
void
commit()
Complete the transaction represented by this Transaction object. 完成Transaction对象表示的事务。
boolean
delistResource(XAResource xaRes, int flag)
Disassociate the resource specified from the transaction associated with the target Transaction object. 解除与目标Transaction对象关联的事务指定的资源关联。
boolean
enlistResource(XAResource xaRes)
Enlist the resource specified with the transaction associated with the target Transaction object. 加入与目标Transaction对象关联的事务指定的资源。
int
getStatus()
Obtain the status of the transaction associated with the target Transaction object. 获取与目标Transaction对象关联的事务状态。
void
registerSynchronization(Synchronization sync)
Register a synchronization object for the transaction currently associated with the target object. 为目前与目标对象关联的事务注册一个同步对象。
void
rollback()
Rollback the transaction represented by this Transaction object. 回滚Transaction对象表示的事务。
void
setRollbackOnly()
Modify the transaction associated with the target object such that the only possible outcome of the transaction is to roll back the transaction. 修改当前线程的关联事务,使得事务的唯一可能结果是回滚该事务。 Method Detail
commit
public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException
- Complete the transaction represented by this Transaction object. 完成Transaction对象表示的事务。
- Throws:
RollbackException
- Thrown to indicate that the transaction has been rolled back rather than committed. 抛出表示事务已被回滚而不是提交。HeuristicMixedException
- Thrown to indicate that a heuristic decision was made and that some relevant updates have been committed while others have been rolled back. 抛出表示试探性决定已经作出,某些相关更新已提交,然而其它一些被回滚。HeuristicRollbackException
- Thrown to indicate that a heuristic decision was made and that all relevant updates have been rolled back. 抛出表示试探性决定已经做出,但所有相关更新已回滚。SecurityException
- Thrown to indicate that the thread is not allowed to commit the transaction. 抛出表示当前线程不允许提交事务。IllegalStateException
- Thrown if the transaction in the target object is inactive. 如果目标对象的事务为非活动状态则抛出。SystemException
- Thrown if the transaction manager encounters an unexpected error condition. 如果事务管理器遭遇无法预料错误的情况时抛出。
delistResource
public boolean delistResource(XAResource xaRes, int flag) throws IllegalStateException, SystemException
- Disassociate the resource specified from the transaction associated with the target Transaction object. 解除与目标Transaction对象关联的事务指定的资源关联。
- Parameters:
xaRes
- The XAResource object associated with the resource (connection). 与资源关联的XAResource对象(连接)。flag
- One of the values of TMSUCCESS, TMSUSPEND, or TMFAIL. TMSUCCESS、TMSUSPEND或者TMFAIL值之一。- Returns:
- true if the resource was delisted successfully; otherwise false. 如果资源已成功被解除,返回true,否则为false。
- Throws:
IllegalStateException
- Thrown if the transaction in the target object is inactive. 如果目标对象的事务为非活动状态则抛出。SystemException
- Thrown if the transaction manager encounters an unexpected error condition. 如果事务管理器遭遇无法预料错误的情况时抛出。
enlistResource
public boolean enlistResource(XAResource xaRes) throws RollbackException, IllegalStateException, SystemException
- Enlist the resource specified with the transaction associated with the target Transaction object. 加入与目标Transaction对象关联的事务指定的资源。
- Parameters:
xaRes
- The XAResource object associated with the resource (connection). 与资源关联的XAResource对象(连接)。- Returns:
- true if the resource was enlisted successfully; otherwise false. 如果资源已成功被加入,返回true,否则为false。
- Throws:
RollbackException
- Thrown to indicate that the transaction has been marked for rollback only. 抛出表示事务已被标记为仅回滚。IllegalStateException
- Thrown if the transaction in the target object is in the prepared state or the transaction is inactive. 如果目标对象的事务在准备状态或者为非活动状态则抛出。SystemException
- Thrown if the transaction manager encounters an unexpected error condition. 如果事务管理器遭遇无法预料错误的情况时抛出。
getStatus
public int getStatus() throws SystemException
- Obtain the status of the transaction associated with the target Transaction object. 获取与目标Transaction对象关联的事务状态。
- Returns:
- The transaction status. If no transaction is associated with the target object, this method returns the Status.NoTransaction value. 事务状态。如果当前线程没有关联事务,方法返回Status.NoTransaction值。
- Throws:
SystemException
- Thrown if the transaction manager encounters an unexpected error condition. 如果事务管理器遭遇无法预料错误的情况时抛出。
registerSynchronization
public void registerSynchronization(Synchronization sync) throws RollbackException, IllegalStateException, SystemException
- Register a synchronization object for the transaction currently associated with the target object. The transction manager invokes the beforeCompletion method prior to starting the two-phase transaction commit process. After the transaction is completed, the transaction manager invokes the afterCompletion method. 为目前与目标对象关联的事务注册一个同步对象。事务管理器在开始两步事务提交过程前调用 beforeCompletion方法。事务完成后,事务管理器调用afterCompletion方法。
- Parameters:
sync
- The Synchronization object for the transaction associated with the target object. 与目标对象关联事务的Synchronization对象。- Throws:
RollbackException
- Thrown to indicate that the transaction has been marked for rollback only. 抛出表示事务已被标记为仅回滚。IllegalStateException
- Thrown if the transaction in the target object is in the prepared state or the transaction is inactive. 如果目标对象的事务在准备状态或者为非活动状态则抛出。SystemException
- Thrown if the transaction manager encounters an unexpected error condition. 如果事务管理器遭遇无法预料错误的情况时抛出。
rollback
public void rollback() throws IllegalStateException, SystemException
- Rollback the transaction represented by this Transaction object. 回滚Transaction对象表示的事务。
- Throws:
IllegalStateException
- Thrown if the transaction in the target object is in the prepared state or the transaction is inactive. 如果目标对象的事务在准备状态或者为非活动状态则抛出。SystemException
- Thrown if the transaction manager encounters an unexpected error condition. 如果事务管理器遭遇无法预料错误的情况时抛出。
setRollbackOnly
public void setRollbackOnly() throws IllegalStateException, SystemException
- Modify the transaction associated with the target object such that the only possible outcome of the transaction is to roll back the transaction. 修改当前线程的关联事务,使得事务的唯一可能结果是回滚该事务。
- Throws:
IllegalStateException
- Thrown if the target object is not associated with any transaction. 如果目标对象没有和关联任何事务时抛出。SystemException
- Thrown if the transaction manager encounters an unexpected error condition. 如果事务管理器遭遇无法预料错误的情况时抛出。
Overview Package Class Tree Deprecated Index Help JavaTM 2 Platform
Ent. Ed. v1.4 PREV CLASS NEXT CLASSFRAMES NO FRAMES All Classes SUMMARY: NESTED | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD
Submit a bug or feature
Copyright 2003 Sun Microsystems, Inc. All rights reserved.
- javax.transaction.Transaction翻译
- javax.transaction.Status翻译
- javax.transaction.UserTransaction翻译
- javax.transaction.TransactionManager翻译
- javax.transaction.TransactionRequiredException翻译
- javax.transaction.RollbackException翻译
- javax.transaction.SystemException翻译
- javax.transaction.InvalidTransactionException翻译
- javax.transaction.NotSupportedException翻译
- javax.transaction.HeuristicCommitException翻译
- javax.transaction.HeuristicMixedException翻译
- javax.transaction.HeuristicRollbackException翻译
- javax.transaction.Synchronization翻译
- javax.transaction.TransactionRolledbackException翻译
- javax/transaction/UserTransaction
- Quartz javax/transaction/UserTransaction
- javax.transaction.TransactionManager
- javax.transaction.SystemException;
- 大道至简 Java 23种模式
- 牛皮不是吹的,火车不是推的
- FSO组件之文件操作(上)
- FSO组件之文件操作(中)
- FSO组件之文件操作(下)
- javax.transaction.Transaction翻译
- 开始重拾code,写点文章励志吧
- 我上班了!
- 忘记Win2000登录密码的解决办法
- ASP+Access创建网站RSS格式内容摘要
- 第三章 Java基本编程结构
- 第四章 对象和类
- Apache lucene知识汇集1 --转载Bluemiles的文章
- 一些系统操作 客户端