Hi,
Ok. What I have done:
1. Update Hibernate an Envers as JBoss modules to the latest version
https://docs.jboss.org/author/display/AS72/JPA+Reference+Guide#JPAReferenceGuide-ReplacingthecurrentHibernate4.0.xjarswithanewerversion
2. Configure the OGM module under JBOSS_DIR/modules/org/hibernate/ogm. Copy paste OGM jar and configure module.xml:
Code:
<module xmlns="urn:jboss:module:1.1" name="org.hibernate" slot="ogm">
<resources>
<resource-root path="hibernate-ogm-core-4.0.0.Beta1.jar"/>
<!-- Insert resources here -->
</resources>
<dependencies>
<module name="org.jboss.as.jpa.hibernate" slot="4"/>
<module name="org.hibernate" slot="main" export="true" />
<module name="javax.api"/>
<module name="javax.persistence.api"/>
<module name="javax.transaction.api"/>
<module name="javax.validation.api"/>
<module name="org.infinispan"/>
<module name="org.javassist"/>
<module name="org.jboss.logging"/>
</dependencies>
</module>
3. Update persistence.xml:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="jpajtastandalone" transaction-type="JTA">
<provider>org.hibernate.ogm.jpa.HibernateOgmPersistence</provider>
<properties>
<property name="hibernate.transaction.jta.platform"
value="org.hibernate.service.jta.platform.internal.JBossStandAloneJtaPlatform" />
<property name="hibernate.ogm.datastore.provider"
value="mongodb"/>
<property name="hibernate.ogm.datastore.grid_dialect" value="org.hibernate.ogm.test.type.OverridingTypeDialect"/>
<property name="hibernate.ogm.mongodb.host" value="127.0.0.1"/>
<property name="hibernate.ogm.mongodb.port" value="27017"/>
<property name="hibernate.ogm.mongodb.database" value="mydb"/>
<property name="jboss.as.jpa.providerModule" value="org.hibernate:ogm"/>
<property name="jboss.as.jpa.adapterModule" value="org.jboss.as.jpa.hibernate:4"/>
<!--
<property name="hibernate.ogm.mongodb.username" value=""/>
<property name="hibernate.ogm.mongodb.password" value=""/>
<property name="hibernate.ogm.mongodb.safe" value=""/>
<property name="hibernate.ogm.mongodb.connection_timeout" value=""/>
<property name="hibernate.ogm.mongodb.associations.store" value=""/>
-->
</properties>
</persistence-unit>
</persistence>
Thanks