Multi data sources are bound to the JNDI tree or local application context just like data sources are bound to the JNDI tree.
Applications lookup a multi data source on the JNDI tree or in the local application context just like they do for data sources, and then request a database connection.
The multi data source determines which data source to use to satisfy the request depending on the algorithm selected in the multi data source configuration: load balancing or failover.
Failover
The Failover algorithm provides an ordered list of data sources to use to satisfy connection requests.
( 1 ) Normally, every connection request to this kind of multi data source is served by the first data source in the
list.
(2 ) If a database connection test fails and the connection cannot be replaced, or if the data source is suspended,
a connection is sought sequentially from the next data source on the list.
Note :-
This algorithm relies on Test Reserved Connections (
TestConnectionsOnReserve
) on the data source to test a connection in the first data source to see if the data source is healthy. If the connection fails the test, the multi data source uses a connection from the next data source listed in the multi data sourceSelect Services -> Multi Data Source then New
Enter name for Multi Data source & JNDI name, Select algo type Failover or Load Balancing
Select Target
Select driver type XA
Select the Data Sources which you want to assign to this Data Source & finish
final
you are given explaintion awesome
ReplyDelete@subhani