Method and apparatus for switching website multiple data sources

A technology of multiple data sources and switching devices, applied in the fields of electrical digital data processing, special data processing applications, instruments, etc., can solve problems such as waste of resources, and achieve the effect of reducing waste, reducing workload, and increasing flexibility

Inactive Publication Date: 2009-04-15
北京中企开源信息技术有限公司
View PDF0 Cites 68 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] In view of this, the main purpose of the present invention is to provide a website multi-data source switching method and device to solve the problem of waste of resources caused by the existing website database connection management

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
  • Method and apparatus for switching website multiple data sources
  • Method and apparatus for switching website multiple data sources

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0031] The technical solutions of the present invention will be further described in detail below in conjunction with specific embodiments.

[0032] When the present invention manages the data source of the website, it adopts a centralized method to manage the database-level connections in a unified manner, that is, a large database connection pool is established at the application program end, so that the connection pool can be used for the same database server. Several websites provide services. Such as figure 1 As shown, a method for switching multiple data sources of a website provided by the present invention mainly includes the following steps:

[0033] Step 101, searching for the mapping relationship between request parameters and data source identifiers, and obtaining the data source identifiers corresponding to the request parameters in the access request.

[0034] When the user needs to visit the website, the client sends an access request to the application server...

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 discloses a method for switching website multiple data sources. The method comprises the following steps: searching a mapping relation between a request parameter and a data source identification to obtain the data source identification corresponding to the request parameter in an access request; initializing a context of the access request and writing the obtained data source identification in the context; calling a data source switching module to obtain the data source identification from the context and obtaining a corresponding connection pool of a database server from a switching strategy according to the data source identification; and obtaining database connection from the connection pool of the database server, switching an access to the corresponding database and executing the access to the database. The invention further discloses a website multiple data source switching device which allocates data source resources by centralized data source connection management, which greatly reduces the number of the desired database connections in the database server; moreover, the website multiple data source switching device can timely and dynamically allocate available database resources, thus reducing the waste of the resources.

Description

technical field [0001] The invention relates to the creation and maintenance technology of a website, in particular to a method and device for switching multiple data sources of a website. Background technique [0002] At present, with the in-depth development of Internet technology, especially the rapid development of enterprise informatization, enterprises have realized the importance of building personalized enterprise information portals relying on the Internet to recommend themselves and sell products, which in turn makes enterprises Relying on the Internet to establish enterprise information portal needs more and more extensive. [0003] Existing website construction solutions usually provide each website with a dedicated database, and each website independently maintains its database connection to improve the security and maintainability of website data. In the maintenance operation of the database connection, the connection pool technology is usually used, that is, ...

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): G06F17/30
Inventor 赵宝刚张雨
Owner 北京中企开源信息技术有限公司
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