Control method of database connection pool

A control method and connection pool technology, which is applied in digital data processing, special data processing applications, program startup/switching, etc., can solve problems such as the lack of database connection pool control methods, and improve database access performance and reduce resource occupation. Effect

Inactive Publication Date: 2014-02-26
STATE GRID CORP OF CHINA +1
View PDF2 Cites 31 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] However, there is a lack of control methods for database connection pools in high concurrency and multiple data source environments in the prior art

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Control method of database connection pool
  • Control method of database connection pool
  • Control method of database connection pool

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0033] In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention. Other embodiments may include structural, logical, electrical, procedural, and the examples merely represent possible variations. Individual components and functions are optional unless explicitly required, and the order of operations may vary. In the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. Portions and features of some embodiments may be included in or substituted for those of other embodiments. The scope of embodiments of the present invention includes the full scope of the claims, and all available equivalents of the cl...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a control method of a database connection pool. The control method includes: normalizing thread priority; judging whether the current connection pool is empty or not, if not, taking out first data connection, setting the current state to be busy, and returning to the data connection; if yes, judging whether number of unreturned data connection in a current external program reaches maximum number of connection in the connection pool or not, if not, increasing the data connection prior to adding the same to the current database connection pool, and returning to the first data connection of the database connection pool; if the number of the unreturned data connection used in the current external program reaches the maximum number of the connection, setting the priority of the current thread, acquiring first time as current time, circularly judging whether the current connection pool is empty or not, and allowing the database connection pool to enter a waiting state. Data access performance can be effectively improved under the condition of high concurrency and multi-data source environment.

Description

technical field [0001] The invention relates to the field of computer databases, in particular to a method for controlling a database connection pool. Background technique [0002] Informatization applications generally access the database frequently. A typical business scenario is: reading business data from the database, assembling it into business information and presenting it to the user, and saving the modified content of the business information by the user to the database. [0003] For a web application system, the application server generally opens up an independent thread for each client (that is, a session, session) access to improve the performance of the application system. At this time, if the database access is established, used, and closed by a single thread, it will seriously block the efficiency of multi-threaded execution, and the establishment of a database access will consume large system resources and time. If the database is frequently established and c...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/48G06F17/30
Inventor 陈清水李海刘红超张健
Owner STATE GRID CORP OF CHINA
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products