Advertisement
Guest User

Untitled

a guest
Sep 28th, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.58 KB | None | 0 0
  1. <GlobalNamingResources>
  2. <Resource name="jdbc/bolsa" auth="Container" type="javax.sql.DataSource"
  3. maxTotal="100" maxIdle="30" maxWaitMillis="10000"
  4. username="root" password="" driverClassName="com.mysql.jdbc.Driver"
  5. url="jdbc:mysql://localhost:3306/bolsa"/>
  6. </GlobalNamingResources>
  7.  
  8. <?xml version="1.0" encoding="UTF-8"?>
  9. <Context path="/zk_login">
  10. <WatchedResource>WEB-INF/web.xml</WatchedResource>
  11. <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
  12.  
  13. <ResourceLink global="jdbc/bolsa" name="jdbc/bolsa" type="javax.sql.DataSource" />
  14.  
  15. <Resource name="jdbc/bolsa" auth="Container" type="javax.sql.DataSource"
  16. maxTotal="100" maxIdle="30" maxWaitMillis="10000"
  17. username="root" password="" driverClassName="com.mysql.jdbc.Driver"
  18. url="jdbc:mysql://localhost:3306/bolsa"/>
  19. </Context>
  20.  
  21. <?xml version="1.0" encoding="UTF-8"?>
  22. <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">
  23. <persistence-unit name="bolsa" transaction-type="RESOURCE_LOCAL">
  24.  
  25. <provider>org.hibernate.ejb.HibernatePersistence</provider>
  26. <non-jta-data-source>java:comp/env/jdbc/bolsa</non-jta-data-source>
  27. <class>bean.Permissao</class>
  28. <class>bean.Usuario</class>
  29. <class>bean.Pagina</class>
  30. <exclude-unlisted-classes>false</exclude-unlisted-classes>
  31.  
  32.  
  33. <properties>
  34.  
  35. <property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider"/>
  36. <property name="hibernate.show_sql" value="true"/>
  37. <!-- dados da conexao -->
  38. <!-- propriedades do hibernate -->
  39. <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect"/>
  40. <property name="hibernate.format_sql" value="true"/>
  41. </properties>
  42. </persistence-unit>
  43. </persistence>
  44.  
  45. <?xml version="1.0" encoding="UTF-8"?>
  46. <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
  47. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  48. xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
  49. http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
  50. version="2.4">
  51. <description>MySQL Test App</description>
  52. <resource-ref>
  53. <description>DB Connection</description>
  54. <res-ref-name>jdbc/bolsa</res-ref-name>
  55. <res-type>javax.sql.DataSource</res-type>
  56. <res-auth>Container</res-auth>
  57. </resource-ref>
  58. </web-app>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement