|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkr.co.hit.live.transaction.TransactionManager
public class TransactionManager
JTA Spec.을 준수하는 TransactionManager 구현 클래스
| Constructor Summary | |
|---|---|
TransactionManager(String id,
long timeout)
생성자이다. |
|
| Method Summary | |
|---|---|
void |
begin()
새로운 Transaction을 시작하고 이것을 현재 Thread에 연계시킨다. |
void |
commit()
현재 Thread에서 진행 중인 트랜잭션을 정상적으로 종료한다. |
int |
getStatus()
현재 Thread에서 진행 중인 트랜잭션의 상태 값을 반환한다. |
String |
getTmId()
트랜젝션 관리자의 고유 ID를 리턴한다. |
Transaction |
getTransaction()
현재 Thread에서 진행 중인 트랜젝션 객체를 반환한다. |
long |
getTransactionTimeout()
트랜잭션 메니저에 설정된 트랜잭션 타임아웃 설정값이다. |
void |
resume(Transaction t)
파라메터로 전달된 트랜잭션 객체를 사용하여 현재 Thread가 트랜젝션을 진행한다. |
void |
rollback()
현재 Thread에서 진행 중인 트랜잭션을 롤백한다. |
void |
setRollbackOnly()
현재 Thread에서 진행 중인 트랜잭션를 롤백만 가능한 상태로 지정한다. |
void |
setTransactionTimeout(int sec)
트랜젝션의 timeout 값을 지정한다. |
Transaction |
suspend()
현재 Thread에서 진행 중인 트랜잭션을 일시적으로 중지하고 해당 트랜젝션 객체를 반환한다. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TransactionManager(String id,
long timeout)
id - 트랜젝션 관리자 ID, 고유한 값을 주어야 한다.| Method Detail |
|---|
public String getTmId()
public void begin()
throws NotSupportedException
begin in interface TransactionManagerNotSupportedException - 쓰레드가 이미 다른 트랜잭션을 시작하였으며
구현된 트랜잭션 메니저가 중복된 트랜젝션을 지원하지 않으므로 발생한다.
public void commit()
throws RollbackException,
HeuristicMixedException,
HeuristicRollbackException,
SystemException,
IllegalStateException
commit in interface TransactionManagerIllegalStateException - 현 쓰레드에 진행 중인 트랜젝션이 존재하지 않는다.
RollbackException
HeuristicMixedException
HeuristicRollbackException
SystemException
public void rollback()
throws IllegalStateException,
SystemException
rollback in interface TransactionManagerIllegalStateException - 현 쓰레드에 진행 중인 트랜젝션이 존재하지 않는다.
SystemExceptionpublic Transaction suspend()
suspend in interface TransactionManager
public void resume(Transaction t)
throws InvalidTransactionException,
IllegalStateException
resume in interface TransactionManagerIllegalStateException - 이미 진행 중인 트랜젝션이 존재한다.
InvalidTransactionException - 전달된 트랜잭션 객체가 잘못되었다.public int getStatus()
getStatus in interface TransactionManager
public void setRollbackOnly()
throws IllegalStateException
setRollbackOnly in interface TransactionManagerIllegalStateException - 현 쓰레드에 진행 중인 트랜젝션이 존재하지 않는다.public Transaction getTransaction()
getTransaction in interface TransactionManagerTransaction 객체를 반환한다.public void setTransactionTimeout(int sec)
setTransactionTimeout in interface TransactionManagerpublic long getTransactionTimeout()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||