{"title":"Self-configuring object-to-relational mapping queries","authors":"P. Pohjalainen, J. Taina","doi":"10.1145/1411732.1411740","DOIUrl":null,"url":null,"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.\n 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.","PeriodicalId":169989,"journal":{"name":"Principles and Practice of Programming in Java","volume":"22 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2008-09-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"6","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Principles and Practice of Programming in Java","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1411732.1411740","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 6
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.