Advertisement
Guest User

Untitled

a guest
May 9th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. > <?xml version="1.0" encoding="UTF-8"?>
  2. >
  3. > <Context> <!-- Default set of monitored resources. If one of these
  4. > changes, the --> <!-- web application will be reloaded. -->
  5. > <WatchedResource>WEB-INF/web.xml</WatchedResource>
  6. > <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
  7. >
  8. > <ResourceLink name="jdbc/toca_dados"
  9. > global="jdbc/toca_dados"
  10. > type="javax.sql.DataSource" />
  11. >
  12. > </Context>
  13.  
  14. > <GlobalNamingResources> <Resource
  15. > auth="Container" description="User database that can be updated and
  16. > saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
  17. > name="UserDatabase" pathname="conf/tomcat-users.xml"
  18. > type="org.apache.catalina.UserDatabase" />
  19. > <Resource name="jdbc/toca_dados" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30"
  20. > maxWait="10000" username="root" password="123"
  21. > driverClassName="com.mysql.jdbc.Driver"
  22. > url="jdbc:mysql://localhost:3306/TOCA_DADOS" />
  23. > </GlobalNamingResources>
  24.  
  25. <persistence xmlns="http://java.sun.com/xml/ns/persistence"
  26. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  27. xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
  28. version="2.0">
  29.  
  30. <persistence-unit name="CLIENT_SQL" transaction-type="RESOURCE_LOCAL">
  31. <non-jta-data-source>java:/comp/env/jdbc/toca_dados</non-jta-data->source>
  32. <properties>
  33. <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect"/>
  34. <property name="connection.autocommit" value="false"/>
  35. <property name="hibernate.hbm2ddl.auto" value="create"/>
  36. <property name="hibernate.show_sql" value="true"/>
  37. </properties>
  38. </persistence-unit>
  39. </persistence>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement