-
1. Re: Slow starting of JBoss 7.1
ctomc May 3, 2013 11:03 AM (in response to iaio81)Hi,
given that it takes more than minute to init hibernate as this two log entries suggest
16:51:00,799 INFO [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator] (MSC service thread 1-1) HHH000130: Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
16:51:01,291 INFO [org.jboss.web] (MSC service thread 1-2) JBAS018210: Registering web context: /winnew
I would say that problem is probably related to configuration of hibernate, do you maybe have ddl validate or update schema configured on start?
that would mean that on every start of application it goes to database and validate whole schema against entites deployed. that can take lots of time.
can you post your persistence.xml
--
tomaz
-
2. Re: Slow starting of JBoss 7.1
iaio81 May 4, 2013 4:38 AM (in response to ctomc)Sorry but the difference between the two logs is 1 second, not 1 minute...isn't it?
-
3. Re: Slow starting of JBoss 7.1
iaio81 May 4, 2013 6:43 AM (in response to iaio81)I've tried deleting persistence.xml file in my Stateless EJB3 and JBoss is very fast.
I post my persistence.xml file:
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="ClienteWIN" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/winsrl</jta-data-source>
<jar-file>WINObjects.jar</jar-file>
</persistence-unit>
</persistence>
-
4. Re: Slow starting of JBoss 7.1
iaio81 May 4, 2013 1:14 PM (in response to iaio81)Here there is my partial detailed server.log and I've focused on the most slow phase (about 90 sec.)
19:04:01,757 TRACE [org.hibernate.service.internal.AbstractServiceRegistryImpl] (MSC service thread 1-1) Initializing service [role=org.hibernate.engine.jdbc.spi.JdbcServices]
19:04:01,763 TRACE [org.hibernate.service.internal.AbstractServiceRegistryImpl] (MSC service thread 1-1) Initializing service [role=org.hibernate.service.jdbc.connections.spi.ConnectionProvider]
19:04:01,764 INFO [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator] (MSC service thread 1-1) HHH000130: Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
19:04:01,769 TRACE [org.hibernate.service.internal.AbstractServiceRegistryImpl] (MSC service thread 1-1) Initializing service [role=org.hibernate.service.jndi.spi.JndiService]
19:04:01,773 TRACE [org.hibernate.service.internal.AbstractServiceRegistryImpl] (MSC service thread 1-1) Initializing service [role=org.hibernate.service.jdbc.dialect.spi.DialectFactory]
19:04:01,775 TRACE [org.hibernate.service.internal.AbstractServiceRegistryImpl] (MSC service thread 1-1) Initializing service [role=org.hibernate.service.jdbc.dialect.spi.DialectResolver]
19:04:01,793 DEBUG [org.hibernate.engine.jdbc.internal.JdbcServicesImpl] (MSC service thread 1-1) Database ->
name : PostgreSQL
version : 8.4.12
major : 8
minor : 4
19:04:01,794 DEBUG [org.hibernate.engine.jdbc.internal.JdbcServicesImpl] (MSC service thread 1-1) Driver ->
name : PostgreSQL Native Driver
version : PostgreSQL 9.2 JDBC4 (build 1002)
major : 9
minor : 2
19:04:01,796 DEBUG [org.hibernate.engine.jdbc.internal.JdbcServicesImpl] (MSC service thread 1-1) JDBC version : 4.0
19:05:38,815 INFO [org.hibernate.dialect.Dialect] (MSC service thread 1-1) HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect