달력

5

« 2024/5 »

  • 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
  • 31
2008. 3. 20. 01:12

dbcp connection이 자꾸 끊어 질 때 DB2008. 3. 20. 01:12

http://kwon37xi.egloos.com/2472081

testOnBorrow를 유력한 후보로 생각했는데, 이 녀석은 default가 true이다. 그래서 제외

그리고 maxWait는 풀에 가용한 컨넥션이 없을 때 exception을 던지기 전에 풀에 반환되는 컨넥션을 기다리는 최대 millisecond이다. 디폴트는 무한대이다.

정답으로 보이는 설정은 위의 url에 설명된 바와 같다.

timeBetweenEvictionRunsMillis(-1)

The number of milliseconds to sleep between runs of the idle object evictor thread. When non-positive, no idle object evictor thread will be run.

numTestsPerEvictionRun(3)

The number of objects to examine during each run of the idle object evictor thread (if any).

minEvictableIdleTimeMillis(1000 * 60 * 30)

The minimum amount of time an object may sit idle in the pool before it is eligable for eviction by the idle object evictor (if any).

:
Posted by codetemplate