A JDBC multi data source is an abstraction around a group of data sources that provides load balancing and failover between data sources. As with data sources, multi data sources are also bound to the JNDI tree. Applications can look up a multi data source on the JNDI tree and then reserve a database connection from a data source. The multi data source determines from which data source to provide the connection. Below I will mention steps to create a MultiDataSource on weblogic 10.
Step 1: First of all create 2 data sources, and keep the connection max size 100 each.
DataSource 1 — Max Connections 100
DataSource 2 — Max Connections 100
Step 2: Login to the Admin Console->
Home >Summary of JDBC Multi Data Sources >Summary of JDBC Data Sources >Summary of JDBC Multi Data Sources >Summary of Services: JDBC End of repetitive links
Step 3: Click on MultiDataSource
Also we can write one Java class to Handle any pool failover situation to send email alerts. By implementing ConnectionPoolFailoverCallback. I will post the same very soon…