Results 1 to 3 of 3

Thread: JPA Performance

  1. #1
    Join Date
    Sep 2008
    Location
    Hyderabad
    Posts
    27

    Default JPA Performance

    Hi All,

    All the ORM frameworks use JDBC internally. So If i am going to use Hibernate, hibernate translates the HQL queries into JDBC queries and then it will execute them. So one level of abstraction layer is there between my code and the actual JDBC execution engine.

    Now JPA is a specification for handling the persistence using ORM concepts. Now i came to know that JBoss Application server is using Hibernate for implementing the JPA specification. So in order to run the persistence related code written in JPA and deployed on the JBoss server first needs to convert to Hibernate HQL queries and then transalates them into JDBC queries, there by it is having two abstraction layer. Doesn't it have performance degredation to have two levels of abstractions?
    Thanks,
    K. Siva Prasad Reddy

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,632

    Default

    Doesn't it have performance degredation to have two levels of abstractions?
    No it doesn't because there aren't 2 levels of abstraction...

    Hibernate uses either JPA -> SQL or HQL -> SQL it is not going to do JPA -> HQL -> SQL. So there is no second level of abstraction.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3

    Default

    Doesn't it have performance degredation to have two levels of abstractions?
    JPA just like you said, is a specification that Hibernate, now, implements.
    There are other ones like Oracle TopLink, etc.
    --
    Thiago Andrade

    MSc Candidate in Computer Science, Federal University of Pernambuco (UFPE) – Brazil
    BSc in Computer Engineering, University of Pernambuco (UPE) – Brazil
    Software Architect

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •