Performance Improvement of OpenJPA by Query Dependency Analysis

  • Miki Enoki
  • Yosuke Ozawa
  • Tamiya Onodera
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5982)


OpenJPA is an implementation of the Java persistence API (JPA) for Apache, with a caching layer for databases queries to share cached objects among multiple client sessions. This is a critical component for high performance, since the caching layer can handle many database requests. However the performance is limited when an application includes write transactions, because the current OpenJPA cache invalidation mechanism is course-grained and this results in a low cache hit rate. We have implemented two kinds of finer-grained invalidation mechanisms by using query dependency analysis and integrated them into OpenJPA. In our experiments with TPC-W, the OpenJPA with the finer-grained invalidation mechanisms outperformed the current OpenJPA. In addition, we created many more mixes TPC-W, and found that the finer mechanism is not necessarily the better, that is, the best mechanism varies depending on the mixes.


EJB3.0 JPA OpenJPA Query dependency analysis Cache invalidation 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    EJB 3.0 Expert Group, JSR 220: Enterprise JavaBeans Version 3.0 Java Persistence API, Sun Microsystems, Santa Clara, CA (2006)Google Scholar
  2. 2.
    Patrick, L., Mark, P.: An in-depth look at the architecture of an object/relational mapper. In: Proceedings of the 2007 ACM SIGMOD international conference on Management of data, pp. 889–894 (2007)Google Scholar
  3. 3.
  4. 4.
  5. 5.
  6. 6.
    Paul, B., Shuping, R.: Entity Bean A, B, C’s: Enterprise Java Beans Commit Options and Caching. In: Guerraoui, R. (ed.) Middleware 2001. LNCS, vol. 2218, pp. 36–55. Springer, Heidelberg (2001)Google Scholar
  7. 7.
    Emmanuel, C., Julie, M., Willy, Z.: Performance and scalability of EJB applications. In: Proc. 17th Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2002), pp. 246–261 (2002)Google Scholar
  8. 8.
    Avraham, L., James, T.: Improving Application Throughput With Enterprise JavaBeans Caching. In: Proceedings of the 23rd International Conference on Distributed Computing Systems (ICDCS 2003), pp. 244–251 (2003)Google Scholar
  9. 9.
    Ben, W., Ali, I., William, R.: Interprocedural query extraction for transparent persistence. In: Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications (OOPSLA 2008), pp. 19–36 (2008)Google Scholar
  10. 10.
    Zachary, T., Chris, T., David, S., Ranjit, J., Sorin, L.: Deep typechecking and refactoring. In: Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications (OOPSLA 2008), pp. 37–52 (2008)Google Scholar
  11. 11.
    Harold, W., Ravi, R., Mowwis, M., Mikko, H.: An Architectural Evaluation of Java TPC-W. In: Seventh International Symposium on High-Performance Computer Architecture (HPCA 2001), p. 229 (2001)Google Scholar
  12. 12.
    Transaction Processing Council. TPC-W specification,
  13. 13.
    Charles, G., Amit, M., Anastasia, A., Bruce, M., Todd, M., Christopher, O., Anthony, T.: Scalable Query Result Caching four Web Applications. In: Proceedings of the 34th Very Large Databases (VLDB 2008), pp. 550–561 (2008)Google Scholar
  14. 14.
    Luo, Q., Krishnamurthy, S., Mohan, C., Pirahesh, H., Woo, H., Lindsay, B.G., Naughton, J.F.: Middle-tier database caching for e-business. In: Proc. ACM SIGMOD International Conference on Management of Data (2002)Google Scholar
  15. 15.
    Amiri, K., Park, S., Tewari, R., Padmanabhan, S.: DBProxy: A dynamic data cache for Web applications. In: Proc. International Conference on Data Engineering, ICDE 2003 (2003)Google Scholar
  16. 16.
    Levy, A.Y., Sagiv, Y.: Queries independent of updates. In: Proc. International Conference on Very Large Data Bases, VLDB 1993 (1993)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Miki Enoki
    • 1
  • Yosuke Ozawa
    • 1
  • Tamiya Onodera
    • 1
  1. 1.IBM ResearchTokyoJapan

Personalised recommendations