Hi everybody,
I'm having a strange phenomenon after updating from 3.1 to 3.2. In my scenario I'm mapping about 150 classes via Hibernate Annotations. Using 3.1 the SessionFactory creation startup time is about 5sec but after updating to 3.2 it takes almost several minutes.
After taking a look into the logging output it seems that the delay is caused by introspecting each table for properties and keys.
I've changed nothing else within the configuratino except replacing the old
hibernate3.jar from 3.1 with the new
hibernate3.jar from the 3.2 release.
Are there any new switches, configuration parameters, etc.?
My connection definition:
Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<hibernate-configuration>
<session-factory>
<property name="dialect">org.hibernate.dialect.MySQLMyISAMDialect</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://aaa/bbb</property>
<property name="connection.username">xxx</property>
<property name="connection.password">yyy</property>
<property name="c3p0.min_size">0</property>
<property name="c3p0.max_size">20</property>
<property name="c3p0.timeout">1000</property>
<property name="hbm2ddl.auto">update</property>
</session-factory>
</hibernate-configuration>
The Logging output is:
Code:
[02.01.2007 11:13:21] INFO [C3P0ConnectionProvider] C3P0 using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://aaaa/bbbb
[02.01.2007 11:13:21] INFO [C3P0ConnectionProvider] Connection properties: {user=xxx, password=****, characterEncoding=UTF-8, zeroDateTimeBehavior=convertToNull}
[02.01.2007 11:13:21] INFO [C3P0ConnectionProvider] autocommit mode: false
[02.01.2007 11:13:21] INFO [SettingsFactory] RDBMS: MySQL, version: 4.1.11-Debian_4sarge7-log
[02.01.2007 11:13:21] INFO [SettingsFactory] JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.0.4 ( $Date: 2006-10-19 17:47:48 +0200 (Thu, 19 Oct 2006) $, $Revision: 5908 $ )
[02.01.2007 11:13:21] INFO [Dialect] Using dialect: org.hibernate.dialect.MySQLMyISAMDialect
[02.01.2007 11:13:21] INFO [TransactionFactoryFactory] Using default transaction strategy (direct JDBC transactions)
[02.01.2007 11:13:21] INFO [TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
[02.01.2007 11:13:21] INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
[02.01.2007 11:13:21] INFO [SettingsFactory] Automatic session close at end of transaction: disabled
[02.01.2007 11:13:21] INFO [SettingsFactory] JDBC batch size: 15
[02.01.2007 11:13:21] INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
[02.01.2007 11:13:21] INFO [SettingsFactory] Scrollable result sets: enabled
[02.01.2007 11:13:21] INFO [SettingsFactory] JDBC3 getGeneratedKeys(): enabled
[02.01.2007 11:13:21] INFO [SettingsFactory] Connection release mode: auto
[02.01.2007 11:13:21] INFO [SettingsFactory] Maximum outer join fetch depth: 2
[02.01.2007 11:13:21] INFO [SettingsFactory] Default batch fetch size: 1
[02.01.2007 11:13:21] INFO [SettingsFactory] Generate SQL with comments: disabled
[02.01.2007 11:13:21] INFO [SettingsFactory] Order SQL updates by primary key: disabled
[02.01.2007 11:13:21] INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
[02.01.2007 11:13:21] INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
[02.01.2007 11:13:21] INFO [SettingsFactory] Query language substitutions: {}
[02.01.2007 11:13:21] INFO [SettingsFactory] JPA-QL strict compliance: disabled
[02.01.2007 11:13:21] INFO [SettingsFactory] Second-level cache: enabled
[02.01.2007 11:13:21] INFO [SettingsFactory] Query cache: disabled
[02.01.2007 11:13:21] INFO [SettingsFactory] Cache provider: org.hibernate.cache.NoCacheProvider
[02.01.2007 11:13:21] INFO [SettingsFactory] Optimize cache for minimal puts: disabled
[02.01.2007 11:13:21] INFO [SettingsFactory] Structured second-level cache entries: disabled
[02.01.2007 11:13:21] INFO [SettingsFactory] Statistics: disabled
[02.01.2007 11:13:21] INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
[02.01.2007 11:13:21] INFO [SettingsFactory] Default entity-mode: pojo
[02.01.2007 11:13:21] INFO [TableMetadata] table found: xxx.Attribute_Enum_Value_Description
[02.01.2007 11:13:21] INFO [TableMetadata] columns: [create_time, update_time, attribute_enum_value_id, description, description_id, locale_code]
[02.01.2007 11:13:21] INFO [TableMetadata] foreign keys: []
[02.01.2007 11:13:21] INFO [TableMetadata] indexes: [primary, fkdd770f73cde35379]