Liferay Portal 6.1 - User Guide
| Download PDF | Purchase Print Book |
Liferay提供丰富知识资源,协助我们的社区与我们的技术更好地结合、应用。
| Download PDF | Purchase Print Book |
Input a list of comma delimited Hibernate configurations.
hibernate.configs=\
META-INF/mail-hbm.xml,\
META-INF/portal-hbm.xml,\
META-INF/ext-hbm.xml
Liferay will automatically detect the Hibernate dialect in com.liferay.portal.spring.PortalHibernateConfiguration. Set this property to manually override the automatically detected dialect.
Example:
hibernate.dialect=
Set the Hibernate connection release mode. You should not modify this unless you know what you’re doing. The default setting works best for Spring managed transactions. See the method buildSessionFactory in class org.springframework.orm.hibernate3.LocalSessionFactoryBean and search for the phrase on_close to understand how this works.
Example:
hibernate.connection.release_mode=on_close
Set the Hibernate cache region factory. Ehcache is recommended in a clustered environment. See the property net.sf.ehcache.configurationResourceName for detailed configuration.
hibernate.cache.region.factory_class=com.liferay.portal.dao.orm.hibernate.region.SingletonLiferayEhcacheRegionFactory
This property is used if Hibernate is configured to use Ehcache’s region factory.
net.sf.ehcache.configurationResourceName=/ehcache/hibernate-clustered.xml
Configure this property if using Ehcache’s default replication method for Hibernate’s region cache.
net.sf.ehcache.configurationResourceName.peerProviderProperties=peerDiscovery=automatic,multicastGroupAddress=${multicast.group.address["hibernate"]},multicastGroupPort=${multicast.group.port["hibernate"]},timeToLive=1
Set other Hibernate cache settings.
hibernate.cache.use_query_cache=true
hibernate.cache.use_second_level_cache=true
hibernate.cache.use_minimal_puts=true
hibernate.cache.use_structured_entries=false
Uncomment these properties to disable Hibernate caching.
Examples:
hibernate.cache.use_query_cache=false
hibernate.cache.use_second_level_cache=false
Set the JDBC batch size to improve performance.
If you’re using Hypersonic, you SHOULD set the batch size to 0 as a workaround for a logging bug in the Hypersonic driver. See http://issues.liferay.com/browse/LPS-5426 for more information.
If you’re using Oracle 9i, you MUST set the batch size to 0 as a workaround for a hanging bug in the Oracle driver. See http://issues.liferay.com/browse/LEP-1234 for more information.
Examples:
hibernate.jdbc.batch_size=20
hibernate.jdbc.batch_size=0
Set other miscellaneous Hibernate properties.
hibernate.jdbc.use_scrollable_resultset=true
hibernate.bytecode.use_reflection_optimizer=true
hibernate.show_sql=false
Use the classic query factory until WebLogic and Hibernate 3 can get along. See http://www.hibernate.org/250.html#A23 for more information.
hibernate.query.factory_class=org.hibernate.hql.classic.ClassicQueryTranslatorFactory
Set this property to true to enable Hibernate cache monitoring. See http://issues.liferay.com/browse/LPS-2056 for more information.
hibernate.generate_statistics=false