摘要 |
Provided are a service request processing method and device. The method comprises: intercepting a service request sent to a database from an application; determining whether an idle connection to the database exists in a connection pool; if not, saving the service request and continuing to determine whether an idle connection to the database exists in the connection pool according to a set rule, until an idle connection is produced in the connection pool; and selecting the produced idle connection and sending the service request to the database using the selected idle connection. By means of the present invention, a service request only needs to be sent once by an application, and thus it can be ensured that the service request can be processed by a database, so that not only the reduction of the usage experience caused by the fact that a user receives a service request failure message can be avoided, but the condition where the service request is sent repeatedly by the application can also be avoided. Therefore, the operation burden of a terminal and a network where the application is can be reduced, and the usage experience of the user can also be improved. |