kr.co.hit.live.transaction
Class UserTransaction

java.lang.Object
  extended by kr.co.hit.live.transaction.UserTransaction
All Implemented Interfaces:
UserTransaction

public class UserTransaction
extends Object
implements UserTransaction

javax.transaction.UserTransaction 의 구현이다.

Since:
3.0
Version:
$Revision: 1.1 $ $Date: 2006/09/26 08:20:18 $
Author:
김형도

Constructor Summary
UserTransaction(TransactionManager otm)
          트랜젝션 관리자 객체를 받아서 새로운 UserTransaction 객체를 생성한다.
 
Method Summary
 void begin()
          새로운 User Transaction을 시작하고 이것을 현재 Thread에 연계시킨다.
 void commit()
          현재 Thread에서 진행 중인 트랜잭션을 정상적으로 종료한다.
 int getStatus()
          현재 Thread에서 진행 중인 트랜잭션의 상태 값을 반환한다.
 void rollback()
          현재 Thread에서 진행 중인 트랜잭션을 롤백한다.
 void setRollbackOnly()
          현재 Thread에서 진행 중인 트랜잭션를 롤백만 가능한 상태로 지정한다.
 void setTransactionTimeout(int seconds)
          트랜젝션의 timeout 값을 지정한다.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserTransaction

public UserTransaction(TransactionManager otm)
트랜젝션 관리자 객체를 받아서 새로운 UserTransaction 객체를 생성한다.

Parameters:
otm - 생성되는 User Transaction을 관리하는 트랜젝션 관리자 객체
Method Detail

begin

public void begin()
           throws NotSupportedException
새로운 User Transaction을 시작하고 이것을 현재 Thread에 연계시킨다.

Specified by:
begin in interface UserTransaction
Throws:
NotSupportedException

commit

public void commit()
            throws RollbackException,
                   HeuristicMixedException,
                   HeuristicRollbackException,
                   SystemException,
                   IllegalStateException
현재 Thread에서 진행 중인 트랜잭션을 정상적으로 종료한다. 이 메소드가 종료되면 현 Thread는 트랜젝션에 연계되지 않는다.

Specified by:
commit in interface UserTransaction
Throws:
RollbackException
HeuristicMixedException
HeuristicRollbackException
SystemException
IllegalStateException

rollback

public void rollback()
              throws IllegalStateException,
                     SystemException
현재 Thread에서 진행 중인 트랜잭션을 롤백한다. 이 메소드가 종료되면 현 Thread는 트랜젝션에 연계되지 않는다.

Specified by:
rollback in interface UserTransaction
Throws:
IllegalStateException
SystemException

setRollbackOnly

public void setRollbackOnly()
                     throws IllegalStateException
현재 Thread에서 진행 중인 트랜잭션를 롤백만 가능한 상태로 지정한다.

Specified by:
setRollbackOnly in interface UserTransaction
Throws:
IllegalStateException

getStatus

public int getStatus()
현재 Thread에서 진행 중인 트랜잭션의 상태 값을 반환한다.

Specified by:
getStatus in interface UserTransaction

setTransactionTimeout

public void setTransactionTimeout(int seconds)
트랜젝션의 timeout 값을 지정한다. (구현되지 않았다.)

Specified by:
setTransactionTimeout in interface UserTransaction


Copyright © 2014. All Rights Reserved.