users@glassfish.java.net

Very low performance with Glassfish 3.1.2 and Java EE + Hibernate

From: <forums_at_java.net>
Date: Sat, 6 Oct 2012 14:58:58 -0500 (CDT)

I faced with very very low performance of Java EE (EJB + JSF) application and
Hibernate(3.6.8.Final and 4.1.7.Final) on Glassfish 3.1.2. Sending about 300
select queries takes about 20 seconds. This is unacceptable. I have exactly
the same application deployed on JBoss and TomEE. There, the same 300 select
queries takes about 1,5 second. I found in google some answers that maybe
hibernate.show_sql is true or hibernate.hbm2ddl make application soo slow.
But it is not true. I turned off hibernate.show_sql but is doesn't matter.
Moreover, these options are true in the JBoss and TomEE versions and it works
over 10 times faster! I thought that this is the issue between Glasfish and
Hibernate. But I have the next application with the same business logic, the
same DAO with EntityManager provided by Hibernate but configurated with
Spring. And the performance is great. It is weird, isn't it? persistance.xml
from the defect version: <?xml version="1.0" encoding="UTF-8"?>
org.hibernate.ejb.HibernatePersistence jdbc/PostgreSQL Glassfish JDBC
configuration:

--
[Message sent by forum member 'lancerx']
View Post: http://forums.java.net/node/891226