Applying AspectJ to Solve Problems with Persistence Frameworks

  • Uwe Hohenstein
  • Michael C. Jaeger
Conference paper
Part of the Communications in Computer and Information Science book series (CCIS, volume 230)


This work reports on problems we had with persistence frameworks in an industrial project. Most problems occurred when replacing the persistence framework Hibernate with OpenJPA. Such a substitution basically means exchanging API calls and dealing with functional differences. But the replacement involved challenging problems since some important Hibernate functionality was missing in OpenJPA and could not be emulated, and other functionality did not work appropriately in OpenJPA. Conventional techniques such as wrapping code are not sufficient to tackle those points. However, we found powerful mechanisms in the aspect-oriented programming language AspectJ to solve problems fast, easily, and in a straightforward manner. All the problems are well-motivated and the aspect-oriented solutions are explained in detail.


Source Code Public Void Lesser General Public License Java Data Object JDBC Driver 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Strunk, W.: The Symphonia Product-Line. In: Java and Object-Oriented (JAOO) Conference (2007) Google Scholar
  2. 2.
    Elrad, T., Filman, R., Bader, A.: Theme Section on Aspect-Oriented Programming. CACM 44(10) (2001)Google Scholar
  3. 3.
    Murphy, G., Walker, A.R., Robillard, M.: Separating Features in Source Code: An Exploratory Study. In: Proc. of 23rd Int. Conf. on Software Engineering (2001)Google Scholar
  4. 4.
    Hannemann, J., Kiczales, G.: Design Pattern Implementation in Java and AspectJ. In: Proc. of the 17th Conf. on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2002 (2002)Google Scholar
  5. 5.
    Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns - Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1995)zbMATHGoogle Scholar
  6. 6.
    Burke, B.: Implementing Middleware Using AOP. In: Proc. 4th Conf. on Aspect-Oriented Software Development (AOSD), Chicago (2005)Google Scholar
  7. 7.
    Laddad, R.: Aspect-Oriented Database Systems. Springer, Heidelberg (2004)Google Scholar
  8. 8.
    Rashid, A.: Persistence as an Aspect. In: [22] Google Scholar
  9. 9.
    Hohenstein U.: Using Aspect-Orientation to Manage Database Statistics. In: [23]Google Scholar
  10. 10.
    Kienzle, J., Gélineau, S.: AO Challenge – Implementing the ACID Properties for Transactional Attributes. In: Proc. of 5th Int. Conf. on Aspect-Oriented Software Development, Bonn, Germany (2006)Google Scholar
  11. 11.
    Coady, Y., Kiczales, G.: Back to the Future: A Retrospective Study of Aspect Evolution in Operating System Code. In: [22]Google Scholar
  12. 12.
    Laddad, R.: AspectJ in Action: Practical Aspect-Oriented Programming, 2nd edn. Manning, Greenwich (2008)Google Scholar
  13. 13.
    Vines, D., Sutter, K.: Migrating Legacy Hibernate Applications to OpenJPA and EJB 3.0.,
  14. 14.
  15. 15.
    Duck, A.: Implementation of AOP in Non-Academic Projects. In: [23] Google Scholar
  16. 16.
    Joosen, W., Sanen, F., Truyen, E.: Dissemination of AOSD expertise support documentation. AOSD-Europe Deliverable No.: AOSD-Europe-KUL-8 Google Scholar
  17. 17.
    Wiese, D., Meunier, R.: Large Scale Application of AOP in the Healthcare Domain: A Case Study. In: Industry Track of 7th Int. Conf. on Aspect-Oriented Software Development (AOSD), Brussels (2008) Google Scholar
  18. 18.
    Kiczales, G.: Adopting AOP. In: Proc. 4th Conf. on Aspect-Oriented Software Development; AOSD 2005, Chicago. ACM Press, New York (2005)Google Scholar
  19. 19.
    Wiese, D., Hohenstein, U., Meunier, R.: How to Convince Industry of Aspect-Orientation? In: Industry Track of 6th Int. Conf. on Aspect-Oriented Software Development, AOSD 2007, Vancouver (2007)Google Scholar
  20. 20.
    Ostermann, K., Mezini, M., Bockisch, C.: Expressive Pointcuts for Increased Modularity. In: Gao, X.-X. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 214–240. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  21. 21.
    Kästner, C., Apel, S., Batory, D.: A Case Study Implementing Features Using AspectJ. In: Proc. Int. Software Product Line Conference (SPLC), Kyoto. IEEE Computer Society, Los Alamitos (2007)Google Scholar
  22. 22.
    Aksit, M.: Proc. of 2nd Int. Conf. on Aspect-Oriented Software Development. In: AOSD 2003 (2003)Google Scholar
  23. 23.
    Chapman, M., Vasseur, A., Kniesel, G.: Proc. of Industry Track of 3rd Conf. on Aspect-Oriented Software Development (AOSD), Bonn (2006)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Uwe Hohenstein
    • 1
  • Michael C. Jaeger
    • 1
  1. 1.CT T DE IT 1Siemens AGMunichGermany

Personalised recommendations