Last active
November 21, 2022 05:54
-
-
Save rafaeltuelho/e770d79521971138b756 to your computer and use it in GitHub Desktop.
Some Hibernate properties to use in your JPA persistence.xml descriptor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Hibenate JPA Provider --> | |
| <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" /> | |
| <property name="hibernate.hbm2ddl.auto" value="create-drop" /> | |
| <property name="hibernate.show_sql" value="true" /> | |
| <property name="hibernate.format_sql" value="true" /> | |
| <property name="hibernate.use_sql_coments" value="true" /> | |
| <property name="hibernate.generate_statistics" value="true" /> | |
| <!-- Infinispan --> | |
| <property name="hibernate.cache.infinispan.statistics" value="true" /> | |
| <property name="hibernate.cache.use_structured_entries" value="true" /> | |
| <!-- 2LC --> | |
| <property name="hibernate.cache.use_second_level_cache" value="true" /> | |
| <property name="hibernate.cache.use_query_cache" value="true" /> | |
| <!-- Hibenate Search (Apache Lucene) --> | |
| <!-- property name="hibernate.search.default.directory_provider" value="filesystem" /--> | |
| <property name="hibernate.search.default.directory_provider" value="infinispan" /> | |
| <property name="hibernate.search.default.worker.backend" value="jgroups" /> | |
| <property name="hibernate.search.default.indexBase" value="/tmp/lucene/index" /> | |
| <shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode> |
Author
Hibernate 5.2 configuration properties:
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To test JPA entities with Hibernate 2LC using Infinispan add
to the entities.
To view JPA Persistence Unit runtime statistics use the following JBoss CLI commands:
To clean/flush the 2LC use the following JBoss CLI commands