Skip to content

Commit

Permalink
Extending production db testing to executor-services module.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsvitak committed Feb 6, 2013
1 parent 8da3c95 commit b2d0e76
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 28 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -25,3 +25,7 @@ bitronix-default-config.properties


# modules that don't exist in this branch # modules that don't exist in this branch
/jbpm-human-task-war/ /jbpm-human-task-war/

# files used for external db testing
jdbc_driver.jar
db-settings.xml
20 changes: 17 additions & 3 deletions jbpm-services/executor-services/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?> <?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" <project
xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.jbpm</groupId> <groupId>org.jbpm</groupId>
Expand Down Expand Up @@ -71,4 +71,18 @@
<type>jar</type> <type>jar</type>
</dependency> </dependency>
</dependencies> </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> </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}
50 changes: 25 additions & 25 deletions pom.xml
Expand Up @@ -144,31 +144,31 @@
</modules> </modules>
</profile> </profile>


<profile> <profile>
<id>database</id> <id>database</id>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<configuration> <configuration>
<additionalClasspathElements> <additionalClasspathElements>
<additionalClasspathElement>${maven.jdbc.driver.jar}</additionalClasspathElement> <additionalClasspathElement>${maven.jdbc.driver.jar}</additionalClasspathElement>
</additionalClasspathElements> </additionalClasspathElements>
<useSystemClassLoader>true</useSystemClassLoader> <useSystemClassLoader>true</useSystemClassLoader>
<includes> <includes>
<include>**/*Test.java</include> <include>**/*Test.java</include>
</includes> </includes>
<excludes> <excludes>
<exclude>**/*AbstractTest.java</exclude> <exclude>**/*AbstractTest.java</exclude>
<exclude>**/*JMS*Test.java</exclude> <exclude>**/*JMS*Test.java</exclude>
</excludes> </excludes>
<argLine>-Xmx1024m -XX:MaxPermSize=128m</argLine> <argLine>-Xmx1024m -XX:MaxPermSize=128m</argLine>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
</profile> </profile>

</profiles> </profiles>


</project> </project>

0 comments on commit b2d0e76

Please sign in to comment.