Permalink
Browse files

Extending production db testing to executor-services module.

  • Loading branch information...
1 parent 8da3c95 commit b2d0e763f4348a978f65e54986c9826144f1060b @jsvitak jsvitak committed Feb 6, 2013
View
@@ -25,3 +25,7 @@ bitronix-default-config.properties
# modules that don't exist in this branch
/jbpm-human-task-war/
+
+# files used for external db testing
+jdbc_driver.jar
+db-settings.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
- xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jbpm</groupId>
@@ -71,4 +71,18 @@
<type>jar</type>
</dependency>
</dependencies>
+
+ <build>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ <filtering>false</filtering>
+ </testResource>
+ <testResource>
+ <directory>src/test/filtered-resources</directory>
+ <filtering>true</filtering>
+ </testResource>
+ </testResources>
+ </build>
+
</project>
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence version="2.0"
+ xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
+ 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
+ http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd">
+
+ <persistence-unit name="org.jbpm.executor" transaction-type="RESOURCE_LOCAL">
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
+ <mapping-file>META-INF/Executor-orm.xml</mapping-file>
+ <class>org.jbpm.executor.entities.ErrorInfo</class>
+ <class>org.jbpm.executor.entities.RequestInfo</class>
+ <exclude-unlisted-classes>true</exclude-unlisted-classes>
+
+ <properties>
+ <property name="hibernate.dialect" value="${maven.hibernate.dialect}" />
+ <property name="hibernate.connection.autocommit" value="false" />
+
+ <property name="hibernate.max_fetch_depth" value="3" />
+ <property name="hibernate.hbm2ddl.auto" value="create-drop" />
+ <property name="hibernate.show_sql" value="false" />
+
+ <property name="hibernate.connection.driver_class" value="${maven.jdbc.driver.class}" />
+ <property name="hibernate.connection.url" value="${maven.jdbc.url}" />
+ <property name="hibernate.connection.username" value="${maven.jdbc.username}" />
+ <property name="hibernate.connection.password" value="${maven.jdbc.password}" />
+
+ <!-- BZ 841786: AS7/EAP 6/Hib 4 uses new (sequence) generators which seem to cause problems -->
+ <property name="hibernate.id.new_generator_mappings" value="false" />
+
+ <!-- needed for JTA testing
+ <property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.BitronixJtaPlatform" />
+ -->
+ </properties>
+ </persistence-unit>
+
+
+
+</persistence>
@@ -0,0 +1,20 @@
+maxPoolSize=${maven.btm.maxPoolSize}
+allowLocalTransactions=true
+# JDBC/Database properties that are set in the maven pom
+#
+# the below variable names (i.e. "${maven.datasource.classname}) are
+# automagically replaced with their values (defined in the pom.xml)
+# because of the fact that <filtering> is set to true in for the
+# src/test/resources directory in the pom.
+#
+className=${maven.datasource.classname}
+driverClassName=${maven.jdbc.driver.class}
+user=${maven.jdbc.username}
+password=${maven.jdbc.password}
+url=${maven.jdbc.url}
+serverName=${maven.jdbc.db.server}
+portNumber=${maven.jdbc.db.port}
+databaseName=${maven.jdbc.db.name}
+makeBaseDb=false
+testMarshalling=false
+txType=${maven.tx.type}
View
50 pom.xml
@@ -144,31 +144,31 @@
</modules>
</profile>
- <profile>
- <id>database</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <additionalClasspathElements>
- <additionalClasspathElement>${maven.jdbc.driver.jar}</additionalClasspathElement>
- </additionalClasspathElements>
- <useSystemClassLoader>true</useSystemClassLoader>
- <includes>
- <include>**/*Test.java</include>
- </includes>
- <excludes>
- <exclude>**/*AbstractTest.java</exclude>
- <exclude>**/*JMS*Test.java</exclude>
- </excludes>
- <argLine>-Xmx1024m -XX:MaxPermSize=128m</argLine>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
-
+ <profile>
+ <id>database</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <additionalClasspathElements>
+ <additionalClasspathElement>${maven.jdbc.driver.jar}</additionalClasspathElement>
+ </additionalClasspathElements>
+ <useSystemClassLoader>true</useSystemClassLoader>
+ <includes>
+ <include>**/*Test.java</include>
+ </includes>
+ <excludes>
+ <exclude>**/*AbstractTest.java</exclude>
+ <exclude>**/*JMS*Test.java</exclude>
+ </excludes>
+ <argLine>-Xmx1024m -XX:MaxPermSize=128m</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
</profiles>
</project>

0 comments on commit b2d0e76

Please sign in to comment.