Guest User

Untitled

a guest
Feb 8th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.37 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
  4. version="2.0" xmlns="http://java.sun.com/xml/ns/persistence">
  5. <persistence-unit name="MY_PERSISTENCE_UNIT" transaction-type="RESOURCE_LOCAL">
  6. <!-- declare class entities here -->
  7.  
  8. <properties>
  9. <property name="javax.persistence.jdbc.url" value="jdbc:mysql://URL_TO_SERVER" />
  10. <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver" />
  11. <property name="javax.persistence.jdbc.user" value="USERNAME" />
  12. <property name="javax.persistence.jdbc.password" value="PASSWORD" />
  13.  
  14. <!-- Optimize database writes to use batching. -->
  15. <property name="eclipselink.jdbc.batch-writing" value="JDBC" />
  16.  
  17. <!-- Avoids flush being triggered before every query execution. -->
  18. <property name="eclipselink.persistence-context.flush-mode"
  19. value="COMMIT" />
  20.  
  21. <!-- Configure connection pool. -->
  22. <property name="eclipselink.jdbc.connections.initial" value="1" />
  23. <property name="eclipselink.jdbc.connections.min" value="64" />
  24. <property name="eclipselink.jdbc.connections.max" value="64" />
  25.  
  26. <!-- Timeout for connection. -->
  27. <property name="eclipselink.jdbc.timeout" value="10" />
  28.  
  29. <!-- Configure cache size. -->
  30. <property name="eclipselink.cache.size.default" value="1000" />
  31.  
  32. <!-- Configure database to be created on startup if not already existing.-->
  33. <property name="eclipselink.ddl-generation" value="create-tables" />
  34.  
  35. <!-- Configure simple SQL logging for demonstration. -->
  36. <property name="eclipselink.logging.level" value="FINE" />
  37. <property name="eclipselink.logging.thread" value="false" />
  38. <property name="eclipselink.logging.session" value="false" />
  39. <property name="eclipselink.logging.exceptions" value="false" />
  40. <property name="eclipselink.logging.timestamp" value="false" />
  41. </properties>
  42. </persistence-unit>
  43.  
  44. ?useSSL=true&requireSSL=true
  45.  
  46. <property name="eclipselink.jdbc.property.my_property_name" value="my_value" />
  47.  
  48. <property name="eclipselink.jdbc.property.useSSL" value="true" />
  49. <property name="eclipselink.jdbc.property.requireSSL" value="true" />
Add Comment
Please, Sign In to add comment