Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <GlobalNamingResources>
- <Resource name="jdbc/bolsa" auth="Container" type="javax.sql.DataSource"
- maxTotal="100" maxIdle="30" maxWaitMillis="10000"
- username="root" password="" driverClassName="com.mysql.jdbc.Driver"
- url="jdbc:mysql://localhost:3306/bolsa"/>
- </GlobalNamingResources>
- <?xml version="1.0" encoding="UTF-8"?>
- <Context path="/zk_login">
- <WatchedResource>WEB-INF/web.xml</WatchedResource>
- <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
- <ResourceLink global="jdbc/bolsa" name="jdbc/bolsa" type="javax.sql.DataSource" />
- <Resource name="jdbc/bolsa" auth="Container" type="javax.sql.DataSource"
- maxTotal="100" maxIdle="30" maxWaitMillis="10000"
- username="root" password="" driverClassName="com.mysql.jdbc.Driver"
- url="jdbc:mysql://localhost:3306/bolsa"/>
- </Context>
- <?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="bolsa" transaction-type="RESOURCE_LOCAL">
- <provider>org.hibernate.ejb.HibernatePersistence</provider>
- <non-jta-data-source>java:comp/env/jdbc/bolsa</non-jta-data-source>
- <class>bean.Permissao</class>
- <class>bean.Usuario</class>
- <class>bean.Pagina</class>
- <exclude-unlisted-classes>false</exclude-unlisted-classes>
- <properties>
- <property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider"/>
- <property name="hibernate.show_sql" value="true"/>
- <!-- dados da conexao -->
- <!-- propriedades do hibernate -->
- <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect"/>
- <property name="hibernate.format_sql" value="true"/>
- </properties>
- </persistence-unit>
- </persistence>
- <?xml version="1.0" encoding="UTF-8"?>
- <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
- http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
- version="2.4">
- <description>MySQL Test App</description>
- <resource-ref>
- <description>DB Connection</description>
- <res-ref-name>jdbc/bolsa</res-ref-name>
- <res-type>javax.sql.DataSource</res-type>
- <res-auth>Container</res-auth>
- </resource-ref>
- </web-app>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement