High Availability Guide : Using HotStandby with applications
  
Using HotStandby with applications
To use HotStandby, your application design must address how your application connects to the HotStandby server and how the application handles failures and failovers.
The way the application connects to the HotStandby server pair might vary depending on where the application resides (compared to the database it is using), and depending on the preferred level of automation in failover situations.
In general, when an application uses a database, it connects to one database, and uses that database for all the queries, reads, and writes. If that database becomes unavailable, the connection is broken and the application must wait until it can reconnect again to the same database. With a HotStandby pair, there are two databases, both live and running, mirroring each other and having the same content. The application has more options available and more responsibilities of making sure that the service the application provides to its users is able to continue even if one of the database nodes fails.
See also
Connecting to HotStandby servers
Transparent Connectivity
Basic Connectivity
Defining timeouts between applications and servers
Configuring SMA with HotStandby
Configuring advanced replication with HotStandby