|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.resource.spi 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 |
LocalTransaction interface provides support for transactions that are managed internal to an EIS resource manager, and do not require an external transaction manager.
A resource adapter implements the javax.resource.spi.LocalTransaction interface to provide support for local transactions that are performed on the underlying resource manager.
If a resource adapter supports the LocalTransaction interface, then the application server can choose to perform local transaction optimization (uses local transaction instead of a JTA transaction for a single resource manager case).
- Version:
- 0.5
- Author:
- Rahul Sharma
- See Also:
ManagedConnection
Method Summary | |
---|---|
void |
begin()
Begin a local transaction |
void |
commit()
Commit a local transaction |
void |
rollback()
Rollback a local transaction |
Method Detail |
---|
public void
begin() throws ResourceException
在 EIS 实例上开始一个本地事务。
Throws | ResourceException:
无法开始本地事务。错误情况的示例有:
|
begin
void begin() throws ResourceException
- Begin a local transaction
- Throws:
ResourceException
- generic exception if operation failsLocalTransactionException
- error condition related to local transaction managementResourceAdapterInternalException
- error condition internal to resource adapterEISSystemException
- EIS instance specific error condition
public void
commit() throws ResourceException
提交当前的本地事务并释放由底层 EIS 实例包含的所有锁。
Throws | ResourceException:
无法提交本地事务。错误情况的示例有:
|
commit
void commit() throws ResourceException
- Commit a local transaction
- Throws:
ResourceException
- generic exception if operation failsLocalTransactionException
- error condition related to local transaction managementResourceAdapterInternalException
- error condition internal to resource adapterEISSystemException
- EIS instance specific error condition
public void
rollback() throws ResourceException
回滚当前资源管理器本地事务。
Throws | ResourceException:
无法回滚本地事务。错误情况的示例有:
|
rollback
void rollback() throws ResourceException
- Rollback a local transaction
- Throws:
ResourceException
- generic exception if operation failsLocalTransactionException
- error condition related to local transaction managementResourceAdapterInternalException
- error condition internal to resource adapterEISSystemException
- EIS instance specific error condition
|
|||||||||
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 : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!