A MultiPool can be defined as a pool of connection pools. This feature was introduced in WebLogic 6.0. This facility is best used in a replicated database server environment. The MultiPool will point to all the replicated database servers. Creating a MultiPoolWhen creating a MultiPool, you have to decide which is the most important factor for your MultiPool: availability or load balancing. Different algorithms are available to prioritize the factor you choose. If availability is the most important factor, each request for a connection is sequentially handled by the set of connection pools in the MultiPool, until a connection is successfully returned. If load balancing is the main criterion, the request for a connection is serviced by any pool available, as discovered in a round-robin search. If the connections are being switched, then the connection pool immediately following the last one accessed is chosen. Connection wait time is another important property to be set while creating a multiple-connection pool. This is the time that the server waits before it requests the next connection from the DBMS. Creation of MultiPools Through the WebLogic Administration ConsoleMultiPools can be created from the Administration Console in the following way:
Each of the tabs on the screen is described next. As can be seen in Figure 7.18, the General tab offers the following options:
Figure 7.18. Configuring a MultiPool in WebLogic Server.Now click the Create button. (Unless you click the Create button, you cannot navigate through the other tabs.) Once you click the Create button, it is replaced by the Apply button if the MultiPool was successfully created. If you make any changes on this screen after creating the MultiPool, you need to click the Apply button before you move on to the next tab. The Pools tab, as you can see in Figure 7.19, lists available connection pools in your system; you have to choose the pools that you wish to include in your MultiPool. Click Apply before you go on to the Targets tab. Figure 7.19. The Pools tab of the WebLogic Administration Console.The Targets tab, as shown in Figure 7.20, lists the WebLogic Servers available for creating the connection pool. You have to select one and transfer it to the Chosen tab before the WebLogic Server actually implements your connection pool. Click the Apply button before proceeding to the Notes tab. Figure 7.20. The Targets tab of the WebLogic Administration Console.Notes are meant only for documentation purposes and do not affect the execution of the MultiPool in any way. During creation of the MultiPools on startup of the WebLogic Server or during execution of the application using MultiPools, errors or exceptions may occur. If these exceptions occur while creating the connection pools at boot time or while switching from one connection pool to another for load balancing, the exceptions are logged by WebLogic in the JDBC log. |