kr.co.hit.live.transaction.datasource
Class XAPooledDataSource

java.lang.Object
  extended by kr.co.hit.live.transaction.datasource.PooledDataSource
      extended by kr.co.hit.live.transaction.datasource.XAPooledDataSource
All Implemented Interfaces:
Wrapper, CommonDataSource, DataSource
Direct Known Subclasses:
StandardXAPooledDataSource

public abstract class XAPooledDataSource
extends PooledDataSource

XADataSource를 사용하여 Connection pooling을 관리하는 javax.sql.DataSource의 구현을 위한 상위 추상클래스이다. Connection pooling 관리를 위한 기능은 PooledDataSource를 상속받아 구현되었으며, 벤더별로 XADataSource을 생성하는 부분은 하위 클래스에서 구현한다.

생성자에 넘겨주는 Properties 객체에 정의되는 프로퍼티들은 다음과 같다.

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

Field Summary
 
Fields inherited from class kr.co.hit.live.transaction.datasource.PooledDataSource
datasourceName, jdbcAutoCommit, jdbcDriver, jdbcPassword, jdbcUrl, jdbcUsername, poolMaxActive, poolMaxIdle, poolTimeToWait, readTimeout
 
Constructor Summary
XAPooledDataSource(Properties props)
           생성자이다.
 
Method Summary
 Connection getConnection()
           PooledDataSource의 getConnection()을 재정의한다.
 
Methods inherited from class kr.co.hit.live.transaction.datasource.PooledDataSource
afterGetConnection, clear, createPooledConnection, getConnection, getDatasourceName, getLoginTimeout, getLogWriter, getPooledConnection, setLoginTimeout, setLogWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
 

Constructor Detail

XAPooledDataSource

public XAPooledDataSource(Properties props)

생성자이다. 설정에 필요한 속성값들은 Properties 객체내에 정의한다.

Parameters:
props - 생성시 사용할 속성값들이 정의된 Properties 객체
Method Detail

getConnection

public Connection getConnection()
                         throws SQLException

PooledDataSource의 getConnection()을 재정의한다. 여기에서 트랜젝션 관련 처리를 한다.

Specified by:
getConnection in interface DataSource
Overrides:
getConnection in class PooledDataSource
Returns:
Connection 객체
Throws:
SQLException - 데이터베이스 연결 시 에러가 발생할 때


Copyright © 2014. All Rights Reserved.