Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <Context>
- <WatchedResource>WEB-INF/web.xml</WatchedResource>
- <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
- <!-- Deixa a conexão com o banco a cargo do container -->
- <Resource name="jdbc/gymclub" auth="Container" type="javax.sql.DataSource"
- maxActive="100" maxIdle="30" maxWait="10000"
- username="admin" password="123456" driverclassname="org.postgresql.Driver"
- url="jdbc:postgresql://localhost:5432/gymclub"/>
- </Context>
- <resource-ref>
- <description>postgreSQL Datasource example</description>
- <res-ref-name>jdbc/gymclub</res-ref-name>
- <res-type>javax.sql.DataSource</res-type>
- <res-auth>Container</res-auth>
- </resource-ref>
- <?xml version="1.0" encoding="UTF-8"?>
- <persistence version="2.1"
- 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">
- <persistence-unit name="gymclub">
- <provider>org.hibernate.ejb.HibernatePersistence</provider>
- <!-- Deixa o controle de conexão com o banco a cargo do container. -->
- <non-jta-data-source>java:/comp/env/jdbc/gymclub</non-jta-data-source>
- <!-- Habilita cache de segundo nivel <shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode> -->
- <properties>
- <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQL9Dialect" />
- <!-- False no ambiente de produção -->
- <property name="hibernate.show_sql" value="true" />
- <property name="hibernate.format_sql" value="true" />
- <!-- None no ambiente de produção -->
- <property name="hibernate.hbm2ddl.auto" value="update" />
- <!-- Essa propriedade permite que as sequences sejam criadas com os valores
- iniciais que são especificados no domínio. -->
- <property name="hibernate.id.new_generator_mappings" value="true" />
- <!-- Cache de segundo nivel do hibernate <property name="hibernate.cache.region.factory_class"
- value="org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory" /> -->
- </properties>
- </persistence-unit>
- Cannot create JDBC driver of class '' for connect URL 'null'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement