|
@@ -1,57 +1,45 @@
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
-
|
|
|
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
|
|
|
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
- xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
|
|
|
- version="2.0">
|
|
|
-
|
|
|
-
|
|
|
- <!-- Database for tests and local dev mode... -->
|
|
|
- <persistence-unit name="h2" transaction-type="RESOURCE_LOCAL">
|
|
|
- <provider>org.hibernate.ejb.HibernatePersistence</provider>
|
|
|
- <properties>
|
|
|
- <property name="javax.persistence.provider" value="org.hibernate.ejb.HibernatePersistence" />
|
|
|
- <property name="hibernate.connection.driver_class" value="org.h2.Driver" />
|
|
|
- <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect" />
|
|
|
- <!-- you may want to enable the ddl if you do not use migrations. -->
|
|
|
- <property name="hibernate.hbm2ddl.auto" value="create" />
|
|
|
- <property name="hibernate.show_sql" value="false" />
|
|
|
- <property name="hibernate.format_sql" value="false" />
|
|
|
- <property name="hibernate.jdbc.batch_size" value="100" />
|
|
|
-
|
|
|
- <!-- Connection Pooling settings -->
|
|
|
- <property name="hibernate.connection.provider_class" value="org.hibernate.hikaricp.internal.HikariCPConnectionProvider" />
|
|
|
- <property name="hibernate.cache.use_query_cache" value="false" />
|
|
|
- <property name="hibernate.minimumIdle" value="256" />
|
|
|
- <property name="hibernate.maximumPoolSize" value="256" />
|
|
|
- <property name="hibernate.idleTimeout" value="30000" />
|
|
|
- <property name="hibernate.dataSourceClassName" value="org.h2.jdbcx.JdbcDataSource" />
|
|
|
- </properties>
|
|
|
- </persistence-unit>
|
|
|
-
|
|
|
- <!-- Direct mysql -->
|
|
|
- <persistence-unit name="mysql" transaction-type="RESOURCE_LOCAL">
|
|
|
- <provider>org.hibernate.ejb.HibernatePersistence</provider>
|
|
|
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
|
|
|
+ version="2.0">
|
|
|
|
|
|
- <properties>
|
|
|
- <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" />
|
|
|
- <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
|
|
|
+ <persistence-unit name="h2" transaction-type="RESOURCE_LOCAL">
|
|
|
+ <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
|
|
|
+ <properties>
|
|
|
+ <property name="javax.persistence.provider" value="org.hibernate.jpa.HibernatePersistenceProvider" />
|
|
|
+ <property name="hibernate.connection.driver_class" value="org.h2.Driver" />
|
|
|
+ <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect" />
|
|
|
+ <property name="hibernate.hbm2ddl.auto" value="create" />
|
|
|
+ <property name="hibernate.show_sql" value="false" />
|
|
|
+ <property name="hibernate.format_sql" value="false" />
|
|
|
+ <property name="hibernate.jdbc.batch_size" value="100" />
|
|
|
+ <property name="hibernate.connection.provider_class" value="org.hibernate.hikaricp.internal.HikariCPConnectionProvider" />
|
|
|
+ <property name="hibernate.cache.use_query_cache" value="false" />
|
|
|
+ <property name="hibernate.minimumIdle" value="256" />
|
|
|
+ <property name="hibernate.maximumPoolSize" value="256" />
|
|
|
+ <property name="hibernate.idleTimeout" value="30000" />
|
|
|
+ <property name="hibernate.dataSourceClassName" value="org.h2.jdbcx.JdbcDataSource" />
|
|
|
+ </properties>
|
|
|
+ </persistence-unit>
|
|
|
|
|
|
- <property name="hibernate.show_sql" value="false" />
|
|
|
- <property name="hibernate.format_sql" value="false" />
|
|
|
- <property name="hibernate.jdbc.batch_size" value="100" />
|
|
|
- <!-- Connection Pooling settings -->
|
|
|
- <property name="hibernate.connection.provider_class" value="org.hibernate.hikaricp.internal.HikariCPConnectionProvider" />
|
|
|
- <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
|
|
|
- <property name="hibernate.cache.use_query_cache" value="false" />
|
|
|
- <property name="hibernate.hikari.minimumIdle" value="256" />
|
|
|
- <property name="hibernate.hikari.maximumPoolSize" value="256" />
|
|
|
- <property name="hibernate.hikari.idleTimeout" value="30000" />
|
|
|
- <property name="hibernate.hikari.dataSourceClassName" value="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" />
|
|
|
- <property name="hibernate.hikari.dataSource.url" value="jdbc:mysql://localhost:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true" />
|
|
|
- <property name="hibernate.hikari.dataSource.user" value="benchmarkdbuser" />
|
|
|
- <property name="hibernate.hikari.dataSource.password" value="benchmarkdbpass" />
|
|
|
- </properties>
|
|
|
- </persistence-unit>
|
|
|
+ <persistence-unit name="mysql" transaction-type="RESOURCE_LOCAL">
|
|
|
+ <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
|
|
|
+ <properties>
|
|
|
+ <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" />
|
|
|
+ <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
|
|
|
+ <property name="hibernate.show_sql" value="false" />
|
|
|
+ <property name="hibernate.format_sql" value="false" />
|
|
|
+ <property name="hibernate.jdbc.batch_size" value="100" />
|
|
|
+ <property name="hibernate.connection.provider_class" value="org.hibernate.hikaricp.internal.HikariCPConnectionProvider" />
|
|
|
+ <property name="hibernate.cache.use_query_cache" value="false" />
|
|
|
+ <property name="hibernate.hikari.minimumIdle" value="256" />
|
|
|
+ <property name="hibernate.hikari.maximumPoolSize" value="256" />
|
|
|
+ <property name="hibernate.hikari.idleTimeout" value="30000" />
|
|
|
+ <property name="hibernate.hikari.dataSource.url" value="jdbc:mysql://localhost:3306/hello_world?useSSL=false&jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true" />
|
|
|
+ <property name="hibernate.hikari.dataSource.user" value="benchmarkdbuser" />
|
|
|
+ <property name="hibernate.hikari.dataSource.password" value="benchmarkdbpass" />
|
|
|
+ </properties>
|
|
|
+ </persistence-unit>
|
|
|
|
|
|
</persistence>
|