quality@glassfish.java.net

Re: Performance JPA?

From: Richard Kolb <rjdkolb_at_gmail.com>
Date: Fri, 4 Mar 2011 11:07:25 +0200

Hi Ed

On 3 March 2011 16:45, Edward Bratt <ed.bratt_at_oracle.com> wrote:

> We had a look at your tests and can offer the following:
>
> - doQueryJDBC() only executes the query against the database. The
> returned result is not processed
> - doQueryJPA() calls queryJPA.getResultList() which not only executes
> the query but traverse the result set and constructs the customer objects.
>
> Try modifying doQueryJDBC() also to traverse the result set and construct
> Customer object for a correct comparison and let us know how that stacks up.
>

You are right. Apples need to compared to Apples.


>
> I can't comment on Hibernate.
>

JPA Hibernate should in 'theory' be quite similar.

regards
Richard.