FCF를 사용하면, connection을 캐시에 저장에 저장합니다. 어떤 db가 RAC이벤트를 생성하고 JDBC에 연결된 JVM에 전달이 됩니다.
그 JVM의 데몬 쓰레드가 RAC 이벤트를 받고, Connection Cache Manager에 전달한다고 합니다. JVM에서는 connection을 정리하고 다른 node로 접속 시도를 하게 된다고 한다.
How It Works
Under Fast Connection Failover, each connection in the cache maintains a mapping to a service, instance, database, and hostname.
When a database generates a RAC event, that event is forwarded to the JVM in which JDBC is running. A daemon thread inside the JVM receives the RAC event and passes it on to the Connection Cache Manager. The Connection Cache Manager then throws SQL exceptions to the applications affected by the RAC event.
A typical failover scenario may work like this:
A database instance fails, leaving several stale connections in the cache.
The RAC mechanism in the database generates a RAC event which is sent to the JVM containing JDBC.
The daemon thread inside the JVM finds all the connections affected by the RAC event, notifies them of the closed connection through SQL exceptions, and rolls back any open transactions.
Each individual connection receives a SQL exception and must retry.
실제 테스트 환경은 다음의 동영상에서 확인가능하다.
DB Client는 이렇게..
ods.setConnectionCachingEnabled(true); ods.setFastConnectionFailoverEnabled(true): |
'DB' 카테고리의 다른 글
[Mysql] To connect without /usr/local/mysql/tmp/mysql.sock (0) | 2009.05.08 |
---|---|
MERGE INTO Statement (0) | 2009.04.25 |
checkng(or seeing) oracle jdbc driver(ojdbc.jar) version (0) | 2009.04.22 |
Dynamically creating table in ibatis (0) | 2009.04.21 |
오라클 10g jdbc driver 특징 중 Fast Connection Fail-Over (0) | 2009.04.10 |