Advertisement
Guest User

Untitled

a guest
Aug 5th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. [...]
  2. "org.hibernate" % "hibernate-core" % "5.2.1.Final",
  3. "org.hibernate" % "hibernate-entitymanager" % "5.2.1.Final",
  4. "mysql" % "mysql-connector-java" % "5.1.36",
  5. //"org.hibernate" % "hibernate-search-orm" % "5.2.1.Final", -> Uncommenting this results in error
  6. "org.apache.lucene" % "lucene-core" % "5.3.1",
  7. "dom4j" % "dom4j" % "1.6"
  8. [...]
  9.  
  10. db.default.driver=com.mysql.jdbc.Driver
  11. db.default.url="jdbc:mysql://localhost/db?autoReconnect=true"
  12. [...db info...]
  13. db.default.jndiName = DefaultDS
  14. jpa.default = defaultPersistenceUnit
  15.  
  16. <hibernate-configuration>
  17. <session-factory>
  18. <!-- Database connection settings -->
  19. <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
  20. <property name="connection.url">jdbc:mysql://localhost/db?autoReconnect=true</property>
  21. <property name="connection.username">###</property>
  22. <property name="connection.password">###</property>
  23.  
  24. <!-- JDBC connection pool (use the built-in) -->
  25. <property name="connection.pool_size">1</property>
  26.  
  27. <!-- SQL dialect -->
  28. <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
  29.  
  30. <!-- Enable Hibernate's automatic session context management -->
  31. <property name="current_session_context_class">thread</property>
  32.  
  33. <!-- Disable the second-level cache -->
  34. <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
  35.  
  36. <!-- Echo all executed SQL to stdout -->
  37. <property name="show_sql">true</property>
  38.  
  39.  
  40. </session-factory>
  41.  
  42. <persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
  43. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  44. xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
  45. version="2.1">
  46. <persistence-unit name="defaultPersistenceUnit" transaction-type="RESOURCE_LOCAL">
  47. <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
  48. <non-jta-data-source>DefaultDS</non-jta-data-source>
  49. <properties>
  50. <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
  51. </properties>
  52.  
  53. </persistence-unit>
  54. </persistence>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement