Self-configuring object-to-relational mapping queries

  • Authors:
  • Pietu Pohjalainen;Juha Taina

  • Affiliations:
  • University of Helsinki;University of Helsinki

  • Venue:
  • Proceedings of the 6th international symposium on Principles and practice of programming in Java
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Object-to-relational maps are nowadays routinely utilized in providing a persistency mechanism for object-oriented programs. We present how an object-to-relational mapper, such as Hibernate, provides transparent persistency to object-oriented programs. We then show how the existing approaches of eager and lazy fetching of associations are problematic under the face of program evolution. As an improvement, we present self-configuring components, which reflectively configure the persistency layer usage sites, thus leading to improved maintainability of software. A self-configuring component analyses the actual persistency layer usage pattern. Based on this information, the actual queries are configured. A general algorithm for retrieving the actual usage pattern is given. As an implementation mechanism, we discuss different approaches for the self-configuring components. Practical choices for implementation can vary between analysis of abstract syntax trees and Java byte-code analysis. Suitability of two byte-code analysis frameworks, namely BCEL and Soot are evaluated.