I'm trying to set up my hibernate to recognize the connection configured in Wildfly, I already tested the connection on the wildfly panel, it's 100% functional. The problem now is to make the application that uses hibernate preview the DS.
I'm trying to set up my hibernate to recognize the connection configured in Wildfly, I already tested the connection on the wildfly panel, it's 100% functional. The problem now is to make the application that uses hibernate preview the DS.
Just add the following setting in your persistence.xmm
<persistence-unit name="bell-adm" >
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<!-- jta-data-source deve conter o mesmo nome definido em datasource jndi-name no arquivos standalone.xml -->
<jta-data-source>java:/BellAdmDS</jta-data-source>
<!-- Entidades -->
<class>br.com.belladm.model.orm.Usuario</class>
<class>br.com.belladm.model.orm.Empresa</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.show_sql" value="true"/>
</properties>
</persistence-unit>
Follow Example: link