Skip to content

Instantly share code, notes, and snippets.

@emmanuelbernard
Created June 24, 2011 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emmanuelbernard/1044781 to your computer and use it in GitHub Desktop.
Save emmanuelbernard/1044781 to your computer and use it in GitHub Desktop.
Hibernate OGM configuration before / after
<!-- when using a relational database -->
<persistence ...>
<persistence-unit name="users" transaction-type="RESOURCE_LOCAL">
<properties>
<property name="javax.persistence.jdbc.driver" value="org.h2.Driver"/>
<property name="javax.persistence.jdbc.user" value="sa"/>
<property name="javax.persistence.jdbc.password" value=""/>
<property name="javax.persistence.jdbc.url" value="jdbc:h2:tcp://localhost/./intro-ogm"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.max_fetch_depth" value="3"/>
</properties>
</persistence-unit>
</persistence>
<!-- when using Hibernate OGM -->
<persistence ...>
<persistence-unit name="users" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ogm.jpa.HibernateOgmPersistence</provider>
<properties>
<property name="hibernate.ogm.infinispan.configuration_resourcename"
value="META-INF/ispn-config.xml"/>
</properties>
</persistence-unit>
</persistence>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment