EP1844395A2 - Multipool manager - Google Patents

Multipool manager

Info

Publication number
EP1844395A2
EP1844395A2 EP05855184A EP05855184A EP1844395A2 EP 1844395 A2 EP1844395 A2 EP 1844395A2 EP 05855184 A EP05855184 A EP 05855184A EP 05855184 A EP05855184 A EP 05855184A EP 1844395 A2 EP1844395 A2 EP 1844395A2
Authority
EP
European Patent Office
Prior art keywords
multipool
connection
manager
pool
pools
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
EP05855184A
Other languages
German (de)
French (fr)
Other versions
EP1844395A4 (en
Inventor
Rahul Srivastava
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEA Systems Inc
Original Assignee
BEA Systems Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from US11/294,214 external-priority patent/US7761502B2/en
Application filed by BEA Systems Inc filed Critical BEA Systems Inc
Publication of EP1844395A2 publication Critical patent/EP1844395A2/en
Publication of EP1844395A4 publication Critical patent/EP1844395A4/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • G06F15/173Interprocessor communication using an interconnection network, e.g. matrix, shuffle, pyramid, star, snowflake
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/22Time-division multiplex systems in which the sources have different rates or codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5011Pool

Definitions

  • connection pool such as a Java Database Connectivity (JDBC) connection pool is provided by the application server.
  • JDBC Java Database Connectivity
  • the connection pool provides a number of already set up connections with a database. These connections are provided to applications of the application server as needed.
  • Such connection pools allow for a relatively large number of applications in the application server to access a database while reducing the database connection time for the application.
  • Figure 1 is a diagram illustrating the use of a multipool with a multipool manager of one embodiment.
  • Figures 2A-2B are diagrams illustrating the use of a multipool manager having an active connection pool list.
  • Figures 3A-3B are flowcharts that illustrate the use of an active connection pool list of one embodiment.
  • Figure 4 is a diagram illustrating the operation of a multipool manager of one embodiment of the present invention.
  • Figures 5A-5B are diagrams that illustrate the use of callbacks with a multipool manager of embodiments of the present invention.
  • Figure 6 is a flowchart illustrating the use of callbacks with a multipool manager of one embodiment of the present invention.
  • FIG. 1 is a diagram that illustrates the operation of a multipool manager 102.
  • the database instances 104 and 106 can each contain a current version of a database run on independent machines, for example.
  • connection pool 108 and connection pool 110 When there are multiple database instances, it can be desirable to use multiple connection pools, such as connection pool 108 and connection pool 110.
  • a multipool system can be used. In a multipool system, a multipool manager 102 can determine which connection pool to use to obtain a connection for an application into the database system.
  • Diffferent methods for selecting a connection pool are possible.
  • One selection method has a primary connection pool and a backup connection pool. The connections are first attempted at a primary connection pool and then upon failure event, the connections are then sent through a backup connection pool.
  • Another method is a load balancing method where the connections are distributed between multiple connection pools to balance the load at the different connection pools.
  • a round-robin method is an example of a load balancing method.
  • One embodiment of the present invention comprises a multipool system to connect to database instances comprising multiple connection pools 202 and 204.
  • the connection pools 202 and 204 are adapted to provide connections to database instances 206 and 208.
  • a multipool manager 210 is adapted to select and set up connections to a database instance through a connection pool.
  • the multipool manager 210 is adapted to keep track of dead connection pools between requests for conections.
  • the multipool manager 210 can select a connection pool in a manner that avoids any dead connection pools. For the example of figure 2A, the multipool manager can avoid selecting connection pool A if it is dead.
  • a selection of only non-dead connection pools is done as authorized by an application. hi one embodiment, the application indicates by a callback or by configuration info whether to switch connection pools.
  • the multipool manager 210 can be adapted to maintain a list 212 of active connection pools and to use the list 212 to determine what connection pool to connect through.
  • list is not meant to imply any specific data structure.
  • the active connection pools on the list can include those connection pools that are not those connection pools determined by the multipool manager to be dead.
  • Dead connection pools can be tested in the background to see whether they should be returned to the active connection pool list.
  • the list of active connection pools can be a subset of a candidate list provided by an application. Alternatively, separate candidate lists and active lists can be maintained, and the multipool manager can select a connection pool that is on both lists.
  • the multipool manager 210 can store an indication for each connection pool associated with the candidate list indicating whether the connnection pool is active or dead.
  • connection pool A is dead, thus not on the active connection pool list 212.
  • An application such as an application 220, can request a connection into one of the database instances 206 or 208 through the multipool manager 210.
  • the multipool manager 210 selects a connection through the connection pool
  • the multipool manager 210 can test whether a connection pool has been revived in the background asynchronously.
  • an asychronous background test module 214 can be used.
  • Figure 2B illustrates an example of this background testing.
  • a SQL test query is sent to the dead connection pool A. If the correct answer is obtained from the database instance 206, the multipool manager 210 can update the active connection pool list
  • connection pool A a connection through the connection pool A is possible.
  • Figure 3B illustrates a flowchart illustrating the asynchronous testing of a dead connection pools.
  • preset wait time passes in step 300.
  • the wait time can be set by an application and stored with the coiifigureation information for the multipool manager or a default value can be used
  • step 302 the dead connection pool is tested. If the dead connection pool has revived as indicated by the test, the active connection pool list 306 is updated, otherwise, the cycle repeats waiting the preset time in step 300.
  • Figure 3 A illustrates the operation of the request for a connection to a database in one embodiment, hi step 308, a request for connection to the database is received at a multipool manager, hi step 310, the multipool manager can select a connection pool.
  • the multipool manager 210 selects a connection pool on an active connection pool list.
  • the connection can then be attemped. hi step 312, it is checked whether the connection pool is dead. If the connection pool is dead, in step 314, the active connection pool list is updated and new connection pool is selected from the active pool list. If the connection pool is not dead, in step 315, it is checked to see whether the connection pool is full. If there is no available connections, then the multipool manager can select another connection pool from the active connection pool list, in step 310. If any selected connection pool is not dead or full, then, in step 316, the connection is done through the selected connection pool.
  • FIG. 4 is a flowchart illustrating different conditions that can occur in one embodiment of the present invention, hi step 402, a request for a connection to the database is received at a multipool manager, hi step 404 a multipool manager selects a connection pool from the active pool list. Its possible, as determined in step 408, that the selected connection pool is a newly revived connection pool. If so, this is called a failback as indicated in step 410. In step 412, it is checked whether the connection pool is dead.
  • connection pool list is updated in step 414, and in step 416, another connection pool is selected from the active connection pool list, this is called a failover condition, hi step 418, if the connection pool is not dead it is checked to see whether the connection pool is full. If the connection pool is full, in step 420, it is checked to see whether a spillover is allowed. If it is, in step 422 another connection pool is selected from the active connection pool list. Step 424, shows a connection is made. As described below an application may authorize a failback, failover or spillover condition with a callback or with config information.
  • One embodiment of the present invention is a multipool manager adapted to select and set up connections to a database instance through a connection pool.
  • the multipool manager is adapted to keep track of dead connection pools.
  • the multipool manager implements a selection method in which the multipool manager avoids selecting dead connection pools to provide a connection for an appplication.
  • One embodiment of the present invention is a multipool system to connect to database instances comprising multiple connection pools.
  • the connection pools are adapted to provide connections to database instances.
  • a multipool manager is adapted to select and set up connections to a database instance through a connection pool.
  • the multipool manager is adapted to keep track of dead connection pools and to asynchronously test whether a connection pool is revived.
  • the multipool manager implements callbacks to an application in order to get authorization from the application for a switch of connection pools.
  • a multipool system is used to connect to database instances with multiple connection pools.
  • the connection pools 502 and 504 are adapted to provide connections to database instances 508 and 510.
  • a multipool manager 506 is adapted to select and set up connections to a database instance through a connection pool.
  • the multipool manager 506 is adapted to check with an application 512 before switching connection pools. In the example of figure 5A 3 a callback is available from the multipool manager 506 to the application 512. If the connection pool is to be switched, the multipool manager 506 can do a callback to the application 512 to determine whether the application will authorize the switch.
  • the active connection pool list includes connection pool B but not connection pool A.
  • a request for connection is received by the multipool manager 506.
  • a callback is done to the application 512.
  • the callback can be, for example, the calling of the callback method 514 which is part of the application 512.
  • the multipool manager 506 can store configuration information 506a which may include an indication of what conditions the callback is to be sent and/or an indication of the callback method name, in this case, callback method A.
  • the application code can implement a callback method 514 in any manner.
  • a callback response is received by the multipool manager in step 3.
  • the callback response can be an indication which multipool manager 506 can use to determine how to connect.
  • the callback response indications include an "OK" indication.
  • the multipool manager switches to the new connection pool.
  • Another callback response indication is a "retry” indication. If a "retry” indication is received, the multipool manager 506 can attempt to get a connection with the old connection pool.
  • Another possible callback response indication is a "don't reconnect” indication. When a "don't reconnect” indication is received the multipool manager not attempt to make a connection.
  • Figure 5B illustrates a possible reason that a "retry" indication might be provided by the callback method. In one example, it may be desirable to do a certain number of attempts onto a primary database instance before switching over to a secondary database instance.
  • Figure 5B illustrates an example in which an independent ping is done from the application 512 to the database insta ⁇ ice . 508 as part of the callback method. If the independent ping comes up with an indication that the database instance 508 is still running, the application can send a "retry" indication. If the application 512 is sufficiently convinced that the database instance is down, a "OK" callback response can be sent.
  • any callback method can be implemented by the application 512.
  • the multipool manager has a callback interface that can be implemented by any application code.
  • Figure 6 is a diagram illustrating the operation of callbacks of one embodiment, hi step 602, it is checked if the connection pool switched as determined by the multipool manager. If the connect pool is not to be switched,; the connection is done to the connection pool in step 604. If the connection is to be switched, then in step 606, it is checked whether a callback is indicated for the condition. If no callbacks is indicated, then the connection is done through the new connection pool without a callback- If a callback is indicated, in step 610, a callback is done. If an "OK" indication is received, the connection is done with the new connection pool in step 614. If a retry indication is received, a connection is attempted to be done using the old connection pool, in step 616.
  • a multipool manager is adapted to select and set up connections to a database instance through a connection pool.
  • the multipool manager is adapted to check with an application before switching connection pools.
  • MultiPools can check with the application before failing over to alternate Pools. This is useful if the configured test for the Pool currently in use encounters a random or transient failure, if the application wants to control when a Database Management System (DBMS) instance that's currently not handling clients is brought back into service or if applications can specified an identity when getting connections from Pools, and connections from a matching pool should be returned. This is useful in cases where the DBMS vendor does not provide native support for setting client identities on anonymous JDBC connections. A number of improvements can be implemented for multipools.
  • DBMS Database Management System
  • FAILOVER - Existing MultiPool algorithm "HIGH_AVAILABILITY" will be renamed as “FAJLOVER”. It will also optionally provide the ability to route application requests for connections to alternative Pools if the current Pool is busy.
  • HEALTH - Existing functionality will be improved to mark dead Pools so that application requests for connections are not routed to these Pools.
  • CALLBACK - A callback interface will be provided to applications to control MultiPool decision to failover to alternative Pools when a failed Pool is detected, or to fail back to Pools previously marked dead.
  • FAILOVER can have connections sent through a primary connection pool and have these connections routed through a secondary connection pool upon the failure of the primary connection pool. FAILOVER can optionally also be able to route application requests for connections to alternative Pools if the current Pool is busy.
  • applications will also be able to configure the following MultiPool attribute:
  • MultiPool can be able to implement and register a callback with the system. This callback can be invoked when the MultiPool detects a dead or busy Pool, giving application the ability to control whether MultiPool fails over to an alternative Pool or not.
  • applications will be able to implement the following interface:
  • WebLogic Server will invoke this interface ' s * method “allowPoolFailover ( ) " and take different actions depending upon
  • Multipools can be enhanced to internally monitor and track the health of the Pools underneath. If a Pool is determined to be dead, it will be marked so and subsequent application requests for connections will not be routed to that Pool.
  • applications will be able to configure the following JDBCMultiPoolMBean attribute:
  • Embodiments may be implemented using a conventional general purpose or a specialized digital computer or microprocessor(s) programmed according to the teachings of the present disclosure, as will be apparent to those skilled in the computer art.
  • Appropriate software coding can readily be prepared by skilled programmers based on the teachings of the present disclosure, as will be apparent to those skilled in the software art.
  • the invention may also be implemented by the preparation of integrated circuits or by interconnecting an appropriate network of conventional component circuits, as will be readily apparent to those skilled in the art.
  • One embodiment includes a computer program product which is a storage medium
  • the storage medium can include, but is not limited to, any type of disk including floppy disks, optical discs, DVD, CD-ROMs, micro drive, and magneto-optical disks, ROMs, Rams, EPROM's, EPROM's, Drams, Rams, flash memory devices, magnetic or optical cards, Nan systems (including molecular memory ICs), or any type of media or device suitable for storing instructions and/or data.
  • the present invention includes software for controlling both the hardware of the general purpose/specialized computer or microprocessor, and for enabling the computer or microprocessor to interact with a human user or other mechanism utilizing the results of the present invention.
  • software may include, but is not limited to, device drivers, operating systems, execution environments/containers, and user applications.

Abstract

Multipools (210) can keep track of dead connection pools (202A) and can avoid selection of the dead connection pools (202A). The multipool (210) can check whether a connection pool (202,204,…) has revived in the background (214).

Description

MULTIPOOL MANAGER
CLAIM OF PRIORITY
U.S. Provisional Application No. 60/640,449, entitled MULTIPOOL IMPROVEMENTS, by Rahul Srivastava, filed December 31, 2004 [Attorney Docket No. BEAS-01789USO];
U.S. Patent Application No. 11/294,147, entitled MULTIPOOL USING AUTOMATICALLY MAINTAINED ACTIVE CONNECTION POOL LIST, by Rahul Srivastava, filed December 5, 2005 [Attorney Docket No. BEAS-01789US1]; and U.S. Patent Application No. 11/294,214, entitled CALLBACK INTERFACE FOR
MULTIPOOLS, by Rahul Srivastava, filed December 5, 2005 [Attorney Docket No. BEAS- 01789US2].
BACKGROUND OF INVENTION Application servers, such as the WebLogic™ Server available from BEA Systems of
San Jose, California, allow users to do a number of functions. One of the functions typically supported by application servers is to provide access to a database. In one embodiment, a connection pool such as a Java Database Connectivity (JDBC) connection pool is provided by the application server. The connection pool provides a number of already set up connections with a database. These connections are provided to applications of the application server as needed. Such connection pools allow for a relatively large number of applications in the application server to access a database while reducing the database connection time for the application.
BRIEF DESCRIPTION OF THE DRAWINGS
Figure 1 is a diagram illustrating the use of a multipool with a multipool manager of one embodiment.
Figures 2A-2B are diagrams illustrating the use of a multipool manager having an active connection pool list. Figures 3A-3B are flowcharts that illustrate the use of an active connection pool list of one embodiment. Figure 4 is a diagram illustrating the operation of a multipool manager of one embodiment of the present invention.
Figures 5A-5B are diagrams that illustrate the use of callbacks with a multipool manager of embodiments of the present invention. Figure 6 is a flowchart illustrating the use of callbacks with a multipool manager of one embodiment of the present invention.
DETAILED DESCRIPTION Multipools using Automatically Maintained Active Connection Pool List Figure 1 is a diagram that illustrates the operation of a multipool manager 102. In some systems, it is desired to have multiple database instances, such as database instances 104 and 106. The database instances 104 and 106 can each contain a current version of a database run on independent machines, for example. When there are multiple database instances, it can be desirable to use multiple connection pools, such as connection pool 108 and connection pool 110. Rather than dedicating each application, such as applications 112, 114 and 116, to a single connection pool and thus to a single database instance, a multipool system can be used. In a multipool system, a multipool manager 102 can determine which connection pool to use to obtain a connection for an application into the database system.
Diffferent methods for selecting a connection pool are possible. One selection method has a primary connection pool and a backup connection pool. The connections are first attempted at a primary connection pool and then upon failure event, the connections are then sent through a backup connection pool. Another method is a load balancing method where the connections are distributed between multiple connection pools to balance the load at the different connection pools. A round-robin method is an example of a load balancing method.
One embodiment of the present invention comprises a multipool system to connect to database instances comprising multiple connection pools 202 and 204. The connection pools 202 and 204 are adapted to provide connections to database instances 206 and 208. A multipool manager 210 is adapted to select and set up connections to a database instance through a connection pool. The multipool manager 210 is adapted to keep track of dead connection pools between requests for conections. The multipool manager 210 can select a connection pool in a manner that avoids any dead connection pools. For the example of figure 2A, the multipool manager can avoid selecting connection pool A if it is dead. In one embodiment, a selection of only non-dead connection pools is done as authorized by an application. hi one embodiment, the application indicates by a callback or by configuration info whether to switch connection pools.
The multipool manager 210 can be adapted to maintain a list 212 of active connection pools and to use the list 212 to determine what connection pool to connect through. The term
"list" is not meant to imply any specific data structure. The active connection pools on the list can include those connection pools that are not those connection pools determined by the multipool manager to be dead.
Dead connection pools can be tested in the background to see whether they should be returned to the active connection pool list. The list of active connection pools can be a subset of a candidate list provided by an application. Alternatively, separate candidate lists and active lists can be maintained, and the multipool manager can select a connection pool that is on both lists. The multipool manager 210 can store an indication for each connection pool associated with the candidate list indicating whether the connnection pool is active or dead.
In example of figure 2A, the connection pool A is dead, thus not on the active connection pool list 212. An application, such as an application 220, can request a connection into one of the database instances 206 or 208 through the multipool manager 210.
In Figure 2A, the multipool manager 210 selects a connection through the connection pool
B.
The multipool manager 210 can test whether a connection pool has been revived in the background asynchronously. In one embodiment, an asychronous background test module 214 can be used.
Figure 2B illustrates an example of this background testing. In this example, a SQL test query is sent to the dead connection pool A. If the correct answer is obtained from the database instance 206, the multipool manager 210 can update the active connection pool list
212 with an indication of the connection pool A. hi this way, the next time an application requests a connection to a database, a connection through the connection pool A is possible.
Figure 3B illustrates a flowchart illustrating the asynchronous testing of a dead connection pools. In one embodiment, preset wait time passes in step 300. The wait time can be set by an application and stored with the coiifigureation information for the multipool manager or a default value can be used In step 302, the dead connection pool is tested. If the dead connection pool has revived as indicated by the test, the active connection pool list 306 is updated, otherwise, the cycle repeats waiting the preset time in step 300. Figure 3 A illustrates the operation of the request for a connection to a database in one embodiment, hi step 308, a request for connection to the database is received at a multipool manager, hi step 310, the multipool manager can select a connection pool. In one embodiment, the multipool manager 210 selects a connection pool on an active connection pool list. The connection can then be attemped. hi step 312, it is checked whether the connection pool is dead. If the connection pool is dead, in step 314, the active connection pool list is updated and new connection pool is selected from the active pool list. If the connection pool is not dead, in step 315, it is checked to see whether the connection pool is full. If there is no available connections, then the multipool manager can select another connection pool from the active connection pool list, in step 310. If any selected connection pool is not dead or full, then, in step 316, the connection is done through the selected connection pool.
Figure 4 is a flowchart illustrating different conditions that can occur in one embodiment of the present invention, hi step 402, a request for a connection to the database is received at a multipool manager, hi step 404 a multipool manager selects a connection pool from the active pool list. Its possible, as determined in step 408, that the selected connection pool is a newly revived connection pool. If so, this is called a failback as indicated in step 410. In step 412, it is checked whether the connection pool is dead. If a connection pool is dead, the active connection pool list is updated in step 414, and in step 416, another connection pool is selected from the active connection pool list, this is called a failover condition, hi step 418, if the connection pool is not dead it is checked to see whether the connection pool is full. If the connection pool is full, in step 420, it is checked to see whether a spillover is allowed. If it is, in step 422 another connection pool is selected from the active connection pool list. Step 424, shows a connection is made. As described below an application may authorize a failback, failover or spillover condition with a callback or with config information.
One embodiment of the present invention is a multipool manager adapted to select and set up connections to a database instance through a connection pool. The multipool manager is adapted to keep track of dead connection pools. The multipool manager implements a selection method in which the multipool manager avoids selecting dead connection pools to provide a connection for an appplication.
One embodiment of the present invention is a multipool system to connect to database instances comprising multiple connection pools. The connection pools are adapted to provide connections to database instances. A multipool manager is adapted to select and set up connections to a database instance through a connection pool. The multipool manager is adapted to keep track of dead connection pools and to asynchronously test whether a connection pool is revived.
Callback Interface for Multipools
In some instances it is desirable to check with the application before switching the connection pool. Switching a connection pool can be a complicated process. Sometimes there are preferred database instances and it is not desired that the user switch to another less desirable database instance unless the first database instances are truly unavailable. In one embodiment of the present invention, the multipool manager implements callbacks to an application in order to get authorization from the application for a switch of connection pools.
In one embodiment of the present invention, a multipool system is used to connect to database instances with multiple connection pools. The connection pools 502 and 504 are adapted to provide connections to database instances 508 and 510. A multipool manager 506 is adapted to select and set up connections to a database instance through a connection pool. The multipool manager 506 is adapted to check with an application 512 before switching connection pools. In the example of figure 5A3 a callback is available from the multipool manager 506 to the application 512. If the connection pool is to be switched, the multipool manager 506 can do a callback to the application 512 to determine whether the application will authorize the switch. In example of figure 5 A, the active connection pool list includes connection pool B but not connection pool A. Before switching to connection pool B the multipool pool manager 506 can do a callback to the application 512. In one embodiment, in step 1 a request for connection is received by the multipool manager 506. In step 2, after the multipool manager determines that a connection pool switch may be desirable, a callback is done to the application 512. The callback can be, for example, the calling of the callback method 514 which is part of the application 512. The multipool manager 506 can store configuration information 506a which may include an indication of what conditions the callback is to be sent and/or an indication of the callback method name, in this case, callback method A. The application code can implement a callback method 514 in any manner. In one embodiment, a callback response is received by the multipool manager in step 3. The callback response can be an indication which multipool manager 506 can use to determine how to connect.
In one embodiment, the callback response indications include an "OK" indication. When the "OK" indication is received, the multipool manager switches to the new connection pool. Another callback response indication is a "retry" indication. If a "retry" indication is received, the multipool manager 506 can attempt to get a connection with the old connection pool. Another possible callback response indication is a "don't reconnect" indication. When a "don't reconnect" indication is received the multipool manager not attempt to make a connection.
Figure 5B illustrates a possible reason that a "retry" indication might be provided by the callback method. In one example, it may be desirable to do a certain number of attempts onto a primary database instance before switching over to a secondary database instance. Figure 5B illustrates an example in which an independent ping is done from the application 512 to the database instaϊice.508 as part of the callback method. If the independent ping comes up with an indication that the database instance 508 is still running, the application can send a "retry" indication. If the application 512 is sufficiently convinced that the database instance is down, a "OK" callback response can be sent.
I \
Any callback method can be implemented by the application 512. hi one example, the multipool manager has a callback interface that can be implemented by any application code.
Figure 6 is a diagram illustrating the operation of callbacks of one embodiment, hi step 602, it is checked if the connection pool switched as determined by the multipool manager. If the connect pool is not to be switched,; the connection is done to the connection pool in step 604. If the connection is to be switched, then in step 606, it is checked whether a callback is indicated for the condition. If no callbacks is indicated, then the connection is done through the new connection pool without a callback- If a callback is indicated, in step 610, a callback is done. If an "OK" indication is received, the connection is done with the new connection pool in step 614. If a retry indication is received, a connection is attempted to be done using the old connection pool, in step 616. Otherwise, if a "don't reconnect" indication is received, no connection through a connection pool is done in Step 618. In one embodiment, a multipool manager is adapted to select and set up connections to a database instance through a connection pool. The multipool manager is adapted to check with an application before switching connection pools.
Detailed Description of One Non-Limiting Example The following description gives one non-limiting implementation of multipool implementation. The discussion below gives one embodiment, but those skilled in the art will understand that other implementations of the above-described concepts can be done. Any potentially limitating language given below is to be interpreted in the context of the specific non-limiting implementation and is not meant to limit the general concepts. MultiPools can check with the application before failing over to alternate Pools. This is useful if the configured test for the Pool currently in use encounters a random or transient failure, if the application wants to control when a Database Management System (DBMS) instance that's currently not handling clients is brought back into service or if applications can specified an identity when getting connections from Pools, and connections from a matching pool should be returned. This is useful in cases where the DBMS vendor does not provide native support for setting client identities on anonymous JDBC connections. A number of improvements can be implemented for multipools.
FAILOVER - Existing MultiPool algorithm "HIGH_AVAILABILITY" will be renamed as "FAJLOVER". It will also optionally provide the ability to route application requests for connections to alternative Pools if the current Pool is busy.
HEALTH - Existing functionality will be improved to mark dead Pools so that application requests for connections are not routed to these Pools.
CALLBACK - A callback interface will be provided to applications to control MultiPool decision to failover to alternative Pools when a failed Pool is detected, or to fail back to Pools previously marked dead.
Applications can configure a FAILOVER algorithm. FAILOVER can have connections sent through a primary connection pool and have these connections routed through a secondary connection pool upon the failure of the primary connection pool. FAILOVER can optionally also be able to route application requests for connections to alternative Pools if the current Pool is busy.
In one embodiment, applications will also be able to configure the following MultiPool attribute:
/**
* If set , application requests for connections will be routed to
* alternate pools if current pool is busy. This is only relevant
* when running with the HIGH_ALGORITHM algorithm. Default implies * feature is disabled .
*
* ©paraπi newVal The new attribute value
* ©dynamic
* ©default false */ public boolean isFailoverReguestlfBusy ( ) ; public void setFailoverRequestlfBusy (boolean failoverRequestlfBusy) ;
Applications can be able to implement and register a callback with the system. This callback can be invoked when the MultiPool detects a dead or busy Pool, giving application the ability to control whether MultiPool fails over to an alternative Pool or not.
In one embodiment, applications will be able to implement the following interface:
/**
* Application can optionally implement this interface if it wants
* to control the failover behavior of WebLogic Server MultiPools .
* If application has registered a class with WebLogic Server that
* implements this interface, WebLogic Server will invoke this interface ' s * method "allowPoolFailover ( ) " and take different actions depending upon
* the return code from the method ' s invokation.
* ©see weblogic .management . configuration. JDBCMultiPoolMBeanttsetConnectionPoolFail overCallbackHandler
*/ public interface ConnectionPoolFailoverCallback { // name of this interface static public final String IF_NAME
"weblogic . j dbc . extensions . ConnectionPoolFailoverCallback" ;
// opcodes for method ' allowPoolFailover ( ) ' static public final int OPCODE_CURR_POOL_DEAD = 0 ; static public final int OPCODE_CURR_POOL_BUSY = 1 ;
Static public final int OPCODE_REENABLE_CURR_POOL = 2 ;
// return codes for method ' allowPoolFailover ( ) ' static public final int OK = 0 ; // application is ok with impending action static public final int RETRY_CURRENT = 1 ; // retry current pool static public final int DONOT_FAILOVER = 2 ; // do not failover, WLS will throw weblogic . j dbc . extensions . PoolUnavailableSQLException
/*
* MultiPool will invoke this method under various failover/failback
* conditions . Application should return one of the above-defined codes
* from this method, based upon application-specific semantics . * Oparam currPool - name of connection pool currently in use .
* will NEVER be null *
* Oparam nextPool - name of alternate connection pool . * will be null for opcode ' OPCODE_RΞENABLE_CURR_POOL ' *
* Oparam opcode - operation being performed
* OPCODE_CURR_POOL_DEAD - ' currPool ' is Dead, MultiPool needs to
* failover application requests for connections to ' nextPool 1. *
* Application should return "OK" , "RETRY_CURRENT" or "DONOT_FAILOVER" ,
* depending on what it wants the MultiPool to do . *
* OPCODE_CURR_POOL_BUSY - ' currPool ' is Busy, MultiPool needs to
* re-route application requests for connections to ' nextPool 1 *
* Application should return "OK" if it is ok with this action,
* else should return either of the other return codes .
* OPCODE_REENABLE_CURR_POOL - ' currPool ' was previously found
* Dead and was consequently disabled . It has now been found healthy,
* and MultiPool needs to re-enable it . *
* Application should return "OK" if it is ok with this action,
* else should return either of the other return codes . */ public int allowPoolFailover (String currPool , String nextPool , int opcode) ;
} Application can register this callback in the attribute
"ConnectionPoolFailoverCallbackHandler" of JDBCMultiPoolMBean.
/**
* Used to set the absolute name of the application class that implements * the interface weblogic . jdbc . extensions . ConnectionPoolFailoverCallback.
*
* ©see weblogic . j dbc . extensions . ConnectionPoolFailoverCallback
* @non- dynamic */ public String getConnectionPoolFailoverCallbackHandler ( ) ; public void setConnectionPoolFailoverCallbackHandler (String className) ;
Multipools can be enhanced to internally monitor and track the health of the Pools underneath. If a Pool is determined to be dead, it will be marked so and subsequent application requests for connections will not be routed to that Pool.
In one embodiment, applications will be able to configure the following JDBCMultiPoolMBean attribute:
/** * Used to configure the frequency at which the MultiPool checks
* the health of connection pools that were previously found
* dead and were consequently disabled . *
* Oparam newVal The new attribute value * ©dynamic
* ©default 300
*/ void setHealthCheckFrequencySeconds ( int newVal ) ; int getHealthCheckFrequencySeconds ( ) ;
Embodiments may be implemented using a conventional general purpose or a specialized digital computer or microprocessor(s) programmed according to the teachings of the present disclosure, as will be apparent to those skilled in the computer art. Appropriate software coding can readily be prepared by skilled programmers based on the teachings of the present disclosure, as will be apparent to those skilled in the software art. The invention may also be implemented by the preparation of integrated circuits or by interconnecting an appropriate network of conventional component circuits, as will be readily apparent to those skilled in the art. One embodiment includes a computer program product which is a storage medium
(media) having instructions stored thereon/in which can be used to program a computer to perform any of the features presented herein. The storage medium can include, but is not limited to, any type of disk including floppy disks, optical discs, DVD, CD-ROMs, micro drive, and magneto-optical disks, ROMs, Rams, EPROM's, EPROM's, Drams, Rams, flash memory devices, magnetic or optical cards, Nan systems (including molecular memory ICs), or any type of media or device suitable for storing instructions and/or data.
Stored on any one of the computer readable medium (media), the present invention includes software for controlling both the hardware of the general purpose/specialized computer or microprocessor, and for enabling the computer or microprocessor to interact with a human user or other mechanism utilizing the results of the present invention. Such software may include, but is not limited to, device drivers, operating systems, execution environments/containers, and user applications.
The foregoing description of preferred embodiments of the present invention has been provided for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Many modifications and variations will be apparent to one of ordinary skill in the relevant arts. For example, steps performed, in the embodiments of the invention disclosed can be performed in alternate orders, certain steps can be omitted, and additional steps can be added. The embodiments were chosen and described in order to best explain the principles of the invention and its practical application, thereby enabling others skilled in the art to understand the invention for various embodiments and with various modifications that are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the claims and their equivalents.

Claims

CLAIMSWhat is claimed is:
1. A multipool system to connect to database instances comprising: multiple connection pools, the connection pools adapted to provide connections to database instances; and a multipool manager adapted to select and set up connections to a database instance through a connection pool, the multipool manager adapted to keep track of dead connection pools between requests for connections.
2. The multipool system of claim 1, wherein the multipool manager tests whether a connection pool has revived.
3. The multipool system of claim 2, wherein the test is done in the background asynchronously.
4. The multipool system of claim 2, wherein the test is done periodically with a time period that can be set by an application.
5. The multipool system of claim 1, wherein the multipool manager sends connections through a primary connection pool preferentially.
6. The multipool system of claim 5, wherein there is spillover to a secondary connection pool
7. The multipool system of claiml, wherein the multipool manager load balances connections through multiple connection pools.
8. The multipool system of claiml, wherein the multipool manager check with an application before switching connection pools.
9. The multipool system of claim 8, wherein the multipool manager uses a callback interface.
10. The multipool system of claim 8, wherein callback information is registered with multipool system by the application.
11. The multipool system of claim 1, wherein the multipool manager maintains a list of active connection pools and uses the list to determine what connection pool to connect through.
12. A multipool system to connect to database instances comprising: multiple connection pools, the connection pools adapted to provide connections to database instances; and a multipool manager adapted to select and set up connections to a database instance through a connection pool, the multipool manager adapted to keep track of dead connection pools and to asynchronously test whether a connection pool is revived.
13. The multipool system of claim 12, wherein the multipool manager sends connections through a primary connection pool preferentially.
14. A multipool system to connect to database instances comprising: multiple connection pools, the connection pools adapted to provide connections to database instances; and a multipool manager adapted to select and set up connections to a database instance through a connection pool, the multipool manager adapted to check with an application before switching connection pools.
15. The multipool system of claim 14, wherein the multipool manager has callback interface.
16. The multipool system of claim 14, wherein if an "OK" indication is received from the application, the multipool manager switches connection pools.
17. The multipool system of claim 14, wherein if a "retry" indication is received from the application, the multipool manager does not switch connection pools and retries the original connection pool.
18. The multipool system of claim 14, wherein if a "don't reconnect" indication is received from the application, the multipool manager does not switch connection pools and does not retry the original connection pool.
19. The multipool system of claim 14, wherein the multipool manager checks with the application before a failover.
20. The multipool system of claim 14, wherein the multipool manager checks with the application before a failback.
EP05855184A 2004-12-31 2005-12-21 Multipool manager Withdrawn EP1844395A4 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
US64044904P 2004-12-31 2004-12-31
US11/294,214 US7761502B2 (en) 2004-12-31 2005-12-05 Callback interface for multipools
US11/294,147 US20060146877A1 (en) 2004-12-31 2005-12-05 Multipool using automatically maintained active connection pool list
PCT/US2005/046581 WO2006073865A2 (en) 2004-12-31 2005-12-21 Multipool manager

Publications (2)

Publication Number Publication Date
EP1844395A2 true EP1844395A2 (en) 2007-10-17
EP1844395A4 EP1844395A4 (en) 2009-08-05

Family

ID=36647997

Family Applications (1)

Application Number Title Priority Date Filing Date
EP05855184A Withdrawn EP1844395A4 (en) 2004-12-31 2005-12-21 Multipool manager

Country Status (5)

Country Link
EP (1) EP1844395A4 (en)
JP (1) JP2008525916A (en)
KR (1) KR20070110011A (en)
AU (1) AU2005323039B2 (en)
WO (1) WO2006073865A2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6256904B2 (en) 2013-04-18 2018-01-10 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation Apparatus and method for distributing processing requests
US9268798B2 (en) 2013-04-26 2016-02-23 Oracle International Corporation Support for cloud-based multi-tenant environments using connection labeling
US9720970B2 (en) 2013-06-06 2017-08-01 Oracle International Corporation Efficient storage and retrieval of fragmented data using pseudo linear dynamic byte array
US9569472B2 (en) 2013-06-06 2017-02-14 Oracle International Corporation System and method for providing a second level connection cache for use with a database environment
US9600546B2 (en) 2013-06-06 2017-03-21 Oracle International Corporation System and method for marshaling massive database data from native layer to java using linear array
US9785687B2 (en) 2013-06-06 2017-10-10 Oracle International Corporation System and method for transparent multi key-value weighted attributed connection using uni-tag connection pools
US9747341B2 (en) 2013-06-06 2017-08-29 Oracle International Corporation System and method for providing a shareable global cache for use with a database environment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6173311B1 (en) * 1997-02-13 2001-01-09 Pointcast, Inc. Apparatus, method and article of manufacture for servicing client requests on a network
US6199110B1 (en) * 1997-05-30 2001-03-06 Oracle Corporation Planned session termination for clients accessing a resource through a server
US20040221031A1 (en) * 2003-04-29 2004-11-04 Oracle International Corporation Method and apparatus using connection pools in communication networks
US20040250248A1 (en) * 2003-02-24 2004-12-09 Halpern Eric M. System and method for server load balancing and server affinity

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3518292B2 (en) * 1997-12-02 2004-04-12 日本電気株式会社 Client server system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6173311B1 (en) * 1997-02-13 2001-01-09 Pointcast, Inc. Apparatus, method and article of manufacture for servicing client requests on a network
US6199110B1 (en) * 1997-05-30 2001-03-06 Oracle Corporation Planned session termination for clients accessing a resource through a server
US20040250248A1 (en) * 2003-02-24 2004-12-09 Halpern Eric M. System and method for server load balancing and server affinity
US20040221031A1 (en) * 2003-04-29 2004-11-04 Oracle International Corporation Method and apparatus using connection pools in communication networks

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
ANONYMOUS: "Configuring WebLogic JDBC Features" ONLINE ARTICLE, [Online] 30 August 2001 (2001-08-30), pages 1-11, XP002531447 Retrieved from the Internet: URL:http://web.archive.org/web/20010830023149/http://edocs.bea.com/wls/docs61/jdbc/programming.html> [retrieved on 2009-06-10] *
See also references of WO2006073865A2 *
XIN ZHANG ET AL: "Building extensible and high performance distributed transaction service" SOFTWARE ENGINEERING CONFERENCE, 2004. PROCEEDINGS. 2004 AUSTRALIAN MELBOURNE, AUSTRALIA 13-16 APRIL 2004, PISCATAWAY, NJ, USA,IEEE, 13 April 2004 (2004-04-13), pages 202-210, XP010698508 ISBN: 978-0-7695-2089-6 *

Also Published As

Publication number Publication date
AU2005323039A1 (en) 2006-07-13
JP2008525916A (en) 2008-07-17
WO2006073865A3 (en) 2006-08-31
WO2006073865A2 (en) 2006-07-13
KR20070110011A (en) 2007-11-15
AU2005323039B2 (en) 2009-01-15
EP1844395A4 (en) 2009-08-05

Similar Documents

Publication Publication Date Title
US7761502B2 (en) Callback interface for multipools
AU2005323039B2 (en) Multipool manager
US7260818B1 (en) System and method for managing software version upgrades in a networked computer system
US9064003B2 (en) System and method for improving application connectivity in a clustered database environment
CN1754146B (en) System and method for server load balancing and server affinity
US7185096B2 (en) System and method for cluster-sensitive sticky load balancing
US20080244552A1 (en) Upgrading services associated with high availability systems
US20050262495A1 (en) Administration mode for server applications
US20080263217A1 (en) Connection control in thin client system
US20030105810A1 (en) Virtual server cloud interfacing
US7219254B2 (en) Method and apparatus for high availability distributed processing across independent networked computer fault groups
US20050262494A1 (en) Production redeployment through application versioning
US8015432B1 (en) Method and apparatus for providing computer failover to a virtualized environment
US8601101B1 (en) Cluster communications framework using peer-to-peer connections
US20180081673A1 (en) System and method for handling lazy deserialization exceptions in an application server environment
WO2005112599A2 (en) System and method for application deployment service
US20040216126A1 (en) Method, system, and article of manufacture for agent processing
JP2017167763A (en) Information processor, test execution method and program
CN110347718B (en) REDIS (REDIS) slicing method, REDIS slicing device, computer equipment and storage medium
US7149918B2 (en) Method and apparatus for high availability distributed processing across independent networked computer fault groups
CN101460921B (en) Next generation clustering
US7127637B2 (en) Method and apparatus for high availability distributed processing across independent networked computer fault groups
CN114463124A (en) System service processing method, device, system and computer readable storage medium
CN116668510A (en) Connection method, device and equipment of registry based on micro-service architecture
CN117528597A (en) Network element fault processing method, device, medium and electronic equipment

Legal Events

Date Code Title Description
PUAI Public reference made under article 153(3) epc to a published international application that has entered the european phase

Free format text: ORIGINAL CODE: 0009012

17P Request for examination filed

Effective date: 20070726

AK Designated contracting states

Kind code of ref document: A2

Designated state(s): AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IS IT LI LT LU LV MC NL PL PT RO SE SI SK TR

DAX Request for extension of the european patent (deleted)
A4 Supplementary search report drawn up and despatched

Effective date: 20090706

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: THE APPLICATION HAS BEEN WITHDRAWN

18W Application withdrawn

Effective date: 20090825