sexta-feira, 9 de dezembro de 2016

Persistence.xml para Postgre

As demais configurações devem ser feitas no servidor de aplicação.

 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>  
 <persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"  
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
        xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence   
        http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"  
        version="2.1">         
      <persistence-unit name="postgre">  
           <provider>org.hibernate.ejb.HibernatePersistence</provider>  
           <jta-data-source>java:jboss/datasources/postgreDS</jta-data-source>            
           <properties>  
                <property name="hibernate.hbm2ddl.auto" value="update"/>  
                <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />  
                <property name="hibernate.show_sql" value="false"/>  
                <property name="hibernate.format_sql" value="false"/>                 
           </properties>  
      </persistence-unit>  
 </persistence>  

Nenhum comentário:

Postar um comentário