摘要 |
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.
|