I am trying to use FAN in my Oracle RAC. I have a connection pool UCP, and many threads use these connections simultaneously to execute queries. When a db instance shuts down and its connection are not available anymore, I want to get that event on my client so I can account for that. I read from docs that this is done by using simple FAN and ONS. But I tried to remove these JARs and my application still worked just fine. When I shut down a database instance I see no errors as if my client is aware of that event (db instance unavailable).
My question is: Does oracle jdbc driver support FAN, if so why would we need to use simpleFan and ONS? What is the added value of using simplefan?
The RAC feature of the Universal Connection Pool (UCP) takes care of draining connections when a RAC instance is brought down. UCP uses Oracle Notification Service (ONS) under the covers to receive the Fast Application Notification (FAN) events. You can see these events if you turn on logging in UCP. SimpleFAN is a library that can be used to process these ONS events yourself. For example, if you are implementing you own connection pool. It uses ONS under the covers. When UCP isn't used, the JDBC thin driver uses SimpleFan to close connections at safe points, for example when you call isValid().