Testing a database connection
AssigneeInternational Business Machines Corporation
InventorsMelissa Sue Modjeski, Har Mohan Puri
Life of this patent
Estimating the term…
Abstract
A method, apparatus, system, and signal-bearing medium that in an embodiment receive a scope level, find datasource configuration data based on the scope level, find an environment variable based on the scope data, and load a database driver based on the datasource configuration data and the environment variable. A connection to a database server is attempted via the database driver. If the connection is successful, success is reported. If the connection fails, failure is reported. In this way, a connection to a database server may be tested without needing to write and deploy an application.
Claims19
A computer-implemented method comprising:
- receiving scope data, wherein the scope data specifies a received scope level;
- determining whether datasource configuration data exists at the received scope level;
- if the datasource configuration data exists at the received scope level, finding the datasource configuration data at the received scope level;
- if the datasource configuration data does not exist at the received scope level, finding the datasource configuration data that matches data at a next scope level;
- finding an enviromnent variable based on the scope data;
- and
- loading a database driver with the datasource configuration data and the environment variable.
An apparatus comprising:
- means for receiving scope data, wherein the scope data specifies a received scope level;
- means for determining whether datasource configuration data exists at the received scope level;
- means for finding the datasource configuration data at the received scope level if the datasource configuration data exists at the received scope level;
- means for finding the datasource configuration data that matches data at a next scope level if the datasource configuration data does not exist at the received scope level;
- means for finding an environment variable based on the scope data;
- and
- means for loading a database driver with the datasource configuration data and the environment variable;
- and
- means for attempting a connection to a database server via the database driver.
A storage medium encoded with instructions, wherein the instructions when executed comprise:
- receiving scope data, wherein the scope data specifies a received scope level;
- determining whether datasource configuration data exists at the received scope level;
- if the datasource configuration data exists at the received scope level, finding the datasource configuration data at the received scope level;
- if the datasource configuration data does not exist at the received scope level, finding the datasource configuration data that matches data at a next scope level;
- finding an environment variable based on the scope data;
- loading a database driver with the datasource configuration data and the environment variable;
- and
- attempting a connection to a database server via the database driver.
A computer system comprising:
- a processor;
- and
- memory encoded with instructions, wherein the instructions when executed on the processor comprise:
- receiving scope data, wherein the scope data specifies a received scope level;
- determining whether datasource configuration data exists at the received scope level,
- if the datasource configuration data exists at the received scope level, finding the datasource configuration data at the received scope level,
- if the datasource configuration data does not exist at the received scope level, finding the datasource configuration data that matches data at a next scope level,
- finding an environment variable based on the scope data,
- loading a database driver with the datasource configuration data and the environment variable,
- attempting a connection to a database server via the database driver.
A method of configuring a computer to perform the method comprising:
- configuring the computer to receive scope data, wherein the scope data specifies a received scope level;
- configuring the computer to determine whether datasource configuration data exists at the received scope level;
- configuring the computer to find the datasource configuration data at the received scope level if the datasource configuration data exists at the received scope level;
- configuring the computer to find the datasource configuration data that matches data at a next scope level if the datasource configuration data does not exist at the received scope level;
- configuring the computer to find an environment variable based on the scope data;
- and
- configuring the computer to load a database driver with the datasource configuration data and the environment variable.
Dependencies are inferred from the claim text.