Commit 12fe59cc980cd61f082cf763a847321a21c21400

Authored by Thomas Ziemer
1 parent 619ec32c

mehrere PUs (WIP)

... ... @@ -19,6 +19,20 @@
19 19 <dbunit-version>2.5.1</dbunit-version>
20 20 <slf4j-version>1.7.25</slf4j-version>
21 21 <jackson-version>2.8.8.1</jackson-version>
  22 +
  23 + <swxercise.schema>swxercise</swxercise.schema>
  24 + <swxercise.host>localhost</swxercise.host>
  25 + <swxercise.user>root</swxercise.user>
  26 + <swxercise.password>root</swxercise.password>
  27 + <swxercise.port>3306</swxercise.port>
  28 +
  29 + <!-- Legacy compatiblity -->
  30 + <TEST_SCHEMA_NAME>swxercise_test</TEST_SCHEMA_NAME>
  31 + <swxercise.test.schema>${TEST_SCHEMA_NAME}</swxercise.test.schema>
  32 + <swxercise.test.host>localhost</swxercise.test.host>
  33 + <swxercise.test.user>root</swxercise.test.user>
  34 + <swxercise.test.password>root</swxercise.test.password>
  35 + <swxercise.test.port>3306</swxercise.test.port>
22 36 </properties>
23 37 <dependencies>
24 38 <dependency>
... ...
src/main/resources/META-INF/persistence.xml
... ... @@ -8,4 +8,31 @@
8 8 <property name="hibernate.hbm2ddl.auto" value="update" />
9 9 </properties>
10 10 </persistence-unit>
11   -</persistence>
12 11 \ No newline at end of file
  12 +
  13 + <persistence-unit name="swXerciseTestPU" transaction-type="RESOURCE_LOCAL">
  14 + <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
  15 + <exclude-unlisted-classes>false</exclude-unlisted-classes>
  16 + <properties>
  17 + <!-- Property for WildFly to ignore this -->
  18 + <property name="jboss.as.jpa.managed" value="false" />
  19 + <!-- Properties for Hibernate -->
  20 + <property name="javax.persistence.jdbc.url" value="jdbc:mysql://${swxercise.test.host}:${swxercise.test.port}/${swxercise.test.schema}" />
  21 + <property name="javax.persistence.jdbc.user" value="${swxercise.test.user}" />
  22 + <property name="javax.persistence.jdbc.password" value="${swxercise.test.password}" />
  23 + <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver" />
  24 + <property name="hibernate.show_sql" value="false" />
  25 + <property name="hibernate.format_sql" value="false" />
  26 + <!--<property name="hibernate.hbm2ddl.auto" value="create-drop" / -->
  27 + <property name="hibernate.connection.useUnicode" value="true" />
  28 + <property name="hibernate.connection.characterEncoding" value="UTF-8" />
  29 + <property name="hibernate.connection.provider_class" value="org.hibernate.connection.C3P0ConnectionProvider" />
  30 + <property name="hibernate.c3p0.min_size" value="2" />
  31 + <property name="hibernate.c3p0.max_size" value="100" />
  32 + <property name="hibernate.c3p0.timeout" value="10" />
  33 + <property name="hibernate.c3p0.max_statements" value="100" />
  34 + <property name="hibernate.c3p0.idle_test_period" value="30" />
  35 + <property name="hibernate.temp.use_jdbc_metadata_defaults" value="false" />
  36 + <property name="hibernate.ejb.entitymanager_factory_name" value="swXerciseTestPU" />
  37 + </properties>
  38 + </persistence-unit>
  39 +</persistence>
... ...