ASPY - An Access-Logging Tool for JDBC Applications

A. Torrentí-Román, L. Pascual-Miret, L. Irún-Briz, S. Beyer, F. D. Muñoz-Escoí


When different developer teams collaborate in the design and implementation of a large and distributed application, some care should be taken regarding the access to persistent data, since different components might use their own transactions and they might collide quite often, generating undesired blocking intervals. Additionally, when third-party libraries are used, they can provide unclear descriptions of their functionality and programmers might mistakingly use some of their operations. An access logger can be useful in both cases, registering the sentences actually sent to the database and the results of said sentences. Aspy is a tool of this kind, developed as a JDBC-driver wrapper for Java applications. It is able to save in a file the list of calls received by the JDBC driver, registering their parameters, starting time, completion time and either their obtained results or their raised exceptions. With such information, it is easy to identify common errors in database accesses and the set of transactions involved in blocking situations due to poor application design. We discuss three different techniques that were used for implementing Aspy, comparing their pros and cons.


  1. Avgustinov, P. et al. (2005). Optimising AspectJ. SIGPLAN Not., 40(6):117-128.
  2. Bauer, C. and King, G. (2006). Java Persistence with Hibernate. Manning Publications Co., Greenwich, CT, USA.
  3. Bloom, R. (2006). Debugging JDBC with a logging driver. Java Developer's Journal.
  4. Douglas, K. and Douglas, S. (2003). PostgreSQL. New Riders Publishing, Thousand Oaks, CA, USA.
  5. Gould, C., Su, Z., and Devanbu, P. (2004). Static checking of dynamically generated queries in database applications. In ICSE 7804, pages 645-654, Washington, DC, USA. IEEE-CS Press.
  6. Hu, Y. and Panda, B. (2003). Identification of malicious transactions in database systems. In IDEAS03, Hong Kong, SAR, pages 329-335. IEEE.
  7. Krishnamoorthy, G. (1999). Heterogeneous query processing through SQL table functions. In ICDE 1999, page 366, Washington, DC, USA. IEEE-CS Press.
  8. Lippert, M. and Lopes, C. V. (2000). A study on exception detection and handling using aspect-oriented programming. In ICSE 7800, pages 418-427, New York, NY, USA. ACM.
  9. Oracle Backup and Recovery (2008). Oracle online documentation. URL:
  10. Shirazi, J. (2000). Java: Performance Tuning. O'Reilly & Associates, Inc., Sebastopol, CA, USA.
  11. The LOG4PLSQL project team (2002). Log 4 pl/sql. Accessible in URL:

Paper Citation

in Harvard Style

Torrentí-Román A., Pascual-Miret L., Irún-Briz L., Beyer S. and D. Muñoz-Escoí F. (2008). ASPY - An Access-Logging Tool for JDBC Applications . In Proceedings of the Third International Conference on Software and Data Technologies - Volume 3: ICSOFT, ISBN 978-989-8111-53-1, pages 104-111. DOI: 10.5220/0001872801040111

in Bibtex Style

author={A. Torrentí-Román and L. Pascual-Miret and L. Irún-Briz and S. Beyer and F. D. Muñoz-Escoí},
title={ASPY - An Access-Logging Tool for JDBC Applications},
booktitle={Proceedings of the Third International Conference on Software and Data Technologies - Volume 3: ICSOFT,},

in EndNote Style

JO - Proceedings of the Third International Conference on Software and Data Technologies - Volume 3: ICSOFT,
TI - ASPY - An Access-Logging Tool for JDBC Applications
SN - 978-989-8111-53-1
AU - Torrentí-Román A.
AU - Pascual-Miret L.
AU - Irún-Briz L.
AU - Beyer S.
AU - D. Muñoz-Escoí F.
PY - 2008
SP - 104
EP - 111
DO - 10.5220/0001872801040111