250x250
Notice
Recent Posts
Recent Comments
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 |
Tags
- jpa
- Source
- oracle
- 설정
- myBatis
- STS
- Spring Boot
- AJAX
- MSSQL
- spring
- Open Source
- Eclipse
- Exception
- Tomcat
- JDBC
- JavaScript
- Core Java
- Thymeleaf
- 문서
- Python
- error
- SpringBoot
- PostgreSQL
- git
- MySQL
- Docker
- 오픈소스
- maven
- IntelliJ
- ubuntu
Archives
- Today
- Total
헤르메스 LIFE
[DBCP]DBCP (Database connection pooling services) 본문
728x90
원문 :
http://kogaeng.tistory.com/292
DBCP (Database connection pooling services)
1.1 DBCP configuration
- DBCP configuration : http://commons.apache.org/dbcp/configuration.html
| DBCP BasicDataSource | iBATIS SimpleDataSource | Option | description |
|---|---|---|---|
| driverClassName | JDBC.Driver | required | JDBC driver class |
| url | JDBC.ConnectionURL | required | DB Connection URL |
| username | JDBC.Username | optional | UserName |
| password | JDBC.Password | optional | Password |
| maxActive | Pool.MaximumActiveConnections | optional | 최대 커넥션 수(Maximum Active Connections) |
| initialSize | Pool.MinimumIdleConnections | optional | 최초 초기화 커넥션 수 |
| maxIdle | Pool.MaximumIdleConnections | optional | 사용되지 않고 풀에 저장될 수 있는 최대 커넥션 개수. 음수일 경우 제한이 없음. |
| minIdle | Pool.MinimumIdleConnections | optional | 사용되지 않고 풀에 저장될 수 있는 최소 커넥션 개수 |
| maxWait | Pool.MaximumWait | optional | 최대 대기시간(milliseconds). 음수일 경우 제한이 없음 |
| validationQuery | Pool.ValidationQuery | optional | Validation Query |
| testOnBorrow | true일 경우 커넥션을 가져올 때 커넥션이 유효한지의 여부를 검사. | ||
| testOnReturn | true일 경우 커넥션을 반환할 때 커넥션이 유효한지의 여부를 검사. | ||
| testWhileIdle | true일 경우 유효하지 않은 커넥션은 풀에서 제거 | ||
| timeBetweenEvictionRunsMillis | 사용되지 않은 커넥션을 추출하는 쓰레드의 실행주기를 지정. ( 음수이면 동작하지 않음, milliseconds) | ||
| numTestsPerEvictionRun | 사용되지 않은 커넥션을 검증할 connection수 지정 | ||
| minEvictableIdleTimeMillis | pool에 대기중인 시간이 설정된 값보다 크다면 validationQuery 와 관계없이 풀에서 제거 |
1.2 connection validation check
<validationQuery>select 1</validationQuery> <testOnBorrow>false</testOnBorrow> <testWhileIdle>true</testWhileIdle> <numTestsPerEvictionRun>1</numTestsPerEvictionRun> <timeBetweenEvictionRunsMillis>3000</timeBetweenEvictionRunsMillis>
728x90
'Spring Framework' 카테고리의 다른 글
| [DataSource] org.apache.commons.dbcp.BasicDataSource Connection Pool 설정 (0) | 2012.02.23 |
|---|---|
| [Spring] Spring + mySql 설정 (0) | 2012.02.23 |
| [Spring] DB Connection (0) | 2012.02.15 |
| [Spring] Annotation Reference for Spring Projects (0) | 2012.01.19 |
| Spring 참고 사이트 목록 (0) | 2012.01.09 |
