|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.resource.cci Interface LocalTransaction
public interface LocalTransaction
LocalTransaction 为资源管理器本地事务定义事务划分接口。注意,此接口用于应用程序级别的本地事务划分。容器使用系统协定级别 LocalTransaction 接口(在
javax.resource.spi
包中定义)进行本地事务管理。
本地事务在资源管理器内部管理。在协调此类事务时不涉及外部事务管理器。
CCI 实现可以(但不需要)实现 LocalTransaction 接口。如果 CCI 实现支持 LocalTransaction 接口,则方法 Connection.getLocalTransaction
应该返回一个 LocalTransaction 实例。然后组件可以使用返回的 LocalTransaction 在底层 EIS 实例上划分资源管理器本地事务(与 Connection 实例关联)。
since | 0.8 |
See also | javax.resource.cci.Connection |
The LocalTransaction defines a transaction demarcation interface for
resource manager local transactions. Note that this interface is
used for application level local transaction demarcation. The
system contract level LocalTransaction interface (as defined in
the javax.resource.spi
package) is used by the container
for local transaction management.
A local transaction is managed internal to a resource manager. There is no external transaction manager involved in the coordination of such transactions.
A CCI implementation can (but is not required to) implement the
LocalTransaction interface. If the LocalTransaction interface is supported
by a CCI implementation, then the method
Connection.getLocalTransaction
should return a
LocalTransaction instance. A component can then use the
returned LocalTransaction to demarcate a resource manager local transaction
(associated with the Connection instance) on the underlying EIS
instance.
- Since:
- 0.8
- Author:
- Rahul Sharma
- See Also:
Connection
Method Summary | |
---|---|
void |
begin()
Begins a local transaction on an EIS instance. |
void |
commit()
Commits the current local transaction and release all locks held by the underlying EIS instance. |
void |
rollback()
Rollbacks the current resource manager local transaction. |
Method Detail |
---|
public void
begin() throws ResourceException
在 EIS 实例上开始一个本地事务。
Throws | ResourceException:
无法开始本地事务。错误情况的示例有:
|
begin
void begin() throws ResourceException
- Begins a local transaction on an EIS instance.
- Throws:
ResourceException
- Failed to begin a local transaction. Examples of error cases are:- Resource adapter internal or EIS-specific error
- Connection is already participating in a local or JTA transaction
public void
commit() throws ResourceException
提交当前的本地事务并释放由底层 EIS 实例包含的所有锁。
Throws | ResourceException:
无法提交本地事务。错误情况的示例有:
|
commit
void commit() throws ResourceException
- Commits the current local transaction and release all locks held
by the underlying EIS instance.
- Throws:
ResourceException
- Failed to commit a local transaction. Examples of error cases are:- Resource adapter internal or EIS-specific error
- Violation of integrity constraints, deadlock detection, communication failure during transaction completion, or any retry requirement
- Connection is participating in an active JTA transaction
- Invalid transaction context; commit operation invoked without an active transaction context
public void
rollback() throws ResourceException
回滚当前资源管理器本地事务。
Throws | ResourceException:
无法回滚本地事务。错误情况的示例有:
|
rollback
void rollback() throws ResourceException
- Rollbacks the current resource manager local transaction.
- Throws:
ResourceException
- Failed to rollback a local transaction. Examples of error cases are:- Resource adapter internal or EIS-specific error
- Connection is participating in an active JTA transaction
- Invalid transaction context; rollback operation invoked without an active transaction context
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!