Skip to content

Instantly share code, notes, and snippets.

Created November 6, 2017 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/2527c05a202c4fba6fba6cd8479ed0bc to your computer and use it in GitHub Desktop.
Save anonymous/2527c05a202c4fba6fba6cd8479ed0bc to your computer and use it in GitHub Desktop.
Swarm doesn't terminate after database connection error during deployment
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>test</artifactId>
<version>1</version>
<packaging>war</packaging>
<properties>
<version.swarm>2017.10.1</version.swarm>
<failOnMissingWebXml>false</failOnMissingWebXml>
</properties>
<dependencies>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>batch-jberet</artifactId>
<version>${version.swarm}</version>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>undertow</artifactId>
<version>${version.swarm}</version>
</dependency>
<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>jaxrs</artifactId>
<version>${version.swarm}</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>6.0.6</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.wildfly.swarm</groupId>
<artifactId>wildfly-swarm-plugin</artifactId>
<version>${version.swarm}</version>
<executions>
<execution>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
# Put this file under src/main/resources
swarm:
batch-jberet:
default-job-repository: myRepo
jdbc-job-repositories:
myRepo:
data-source: ExampleDS
default-thread-pool: myTP
thread-pools:
myTP:
max-threads: 10
keepalive-time: 30
datasources:
data-sources:
ExampleDS:
jndi-name: java:jboss/datasources/ExampleDS
connection-url: jdbc:mysql://non-existent/database
driver-name: mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment