IP Library › Granted Patent US 7,945,591
Granted Patent B2
US 7,945,591 · App. 11/154,162 · Granted May 17, 2011

Identifying problems, usage patterns, and performance in a database interface using aspect-oriented programming

Assignee: International Business Machines Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,945,591
App. No.
11/154,162
Granted
May 17, 2011
Kind
B2
Abstract

A method, computer program product, and data processing system for efficiently diagnosing errors and inefficiencies in database application code are disclosed. According to a preferred embodiment, techniques of aspect-oriented programming (AOP) are used to instrument database application code to monitor the usage of database resources. Specifically, pointcuts are defined to intercept accesses of database resources. Advice code associated with these pointcuts is used to collect information about the usage of database resources and to detect certain errors, such as resource leaks, when they occur. In a preferred embodiment, the AspectJ aspect-oriented programming language/system is used to define the pointcuts and advice code.

Claims (26)

1. In a data processing system having a processor, a method comprising:

the processor executing program code that performs the function of instrumenting an application with a first aspect, wherein the first aspect is associated with aspect source code that defines a pointcut identifying a database-related operation and wherein the first aspect is associated with an advice code that identifies a characteristic of the database-related operation and determines whether a database-related resource is returned to a pool of resources after being used by the application; and

instrumenting the application with a second aspect, wherein the second aspect is associated with the pointcut identifying a second database-related operation and wherein the second aspect is associated with advice code that identifies the characteristic of the second database-related operation.

2. The method of claim 1 , wherein the characteristic of the second database-related operation is whether the database-related operation is a call to a deprecated application programming interface (API).

3. The method of claim 1 , wherein the characteristic of the second database-related operation indicates whether all rows of a database result set are used by the application.

4. The method of claim 1 , wherein the characteristic of the second database-related operation indicates which columns of a database result set are used by the application.

5. The method of claim 1 , wherein the characteristic of the second database-related operation is a size of an object handled by the second database-related operation.

6. The method of claim 1 , wherein the characteristic of the second database-related operation is an elapsed time for the second database-related operation.

7. A computer program product stored in a non-transitory computer readable medium comprising functional descriptive material that, when executed by a computer, directs the computer to perform actions that include:

instrumenting an application with a first aspect, wherein the first aspect is associated with aspect code that defines a pointcut identifying a first database-related operation and wherein the first aspect is associated with an advice code that identifies a characteristic of the database-related operation and determines whether a database-related resource is returned to a pool of resources after being used by the application; and

instrumenting the application with a second aspect, wherein the second aspect is associated with the pointcut identifying a second database-related operation and wherein the second aspect is associated with advice code that identifies the characteristic of the second database-related operation.

8. The computer program product of claim 7 , wherein the characteristic of the second database-related operation is whether the second database-related operation is a call to a deprecated application programming interface (API).

9. The computer program product of claim 7 , wherein the characteristic of the second database-related operation indicates whether all rows of a database result set are used by the application.

10. The computer program product of claim 7 , wherein the characteristic of the second database-related operation indicates which columns of a database result set are used by the application.

11. The computer program product of claim 7 , wherein the characteristic of the second database-related operation is a size of an object handled by the second database-related operation.

12. The computer program product of claim 7 , wherein the characteristic of the second database-related operation is an elapsed time for the second database-related operation.

13. A data processing system comprising:

at least one processor;

at least one data store associated with the at least one processor; and

a set of instructions in the at least one data store, wherein the at least one processor executes the set instructions to perform actions that include:

instrumenting an application with a first aspect, wherein the first aspect is associated with aspect code that defines a pointcut identifying a first database-related operation and wherein the first aspect is associated with an advice code that identifies a characteristic of the database-related operation and determines whether a database-related resource is returned to a pool of resources after being used by the application; and

instrumenting the application with a second aspect, wherein the second aspect is associated with the pointcut identifying a second database-related operation and wherein the second aspect is associated with advice code that identifies the characteristic of the second database-related operation.

14. The data processing system of claim 13 , wherein the characteristic of the second database-related operation is whether the second database-related operation is a call to a deprecated application programming interface (API).

15. The data processing system of claim 13 , wherein the characteristic of the second database-related operation indicates which columns of a database result set are used by the application.

16. The data processing system of claim 13 , wherein the characteristic of the second database-related operation is a size of an object handled by the second database-related operation.

17. The data processing system of claim 13 , wherein the characteristic of the second database-related operation is an elapsed time for the second database-related operation.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 5, 2005
From: KUMAR, ARUN; SINGH, ROHIT
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 016463/0468 →
Continuity (1)
Related Publication 20060288025A1 · Dec 21, 2006