Cheat Sheet

WildFly Swarm Cheat Sheet

By Andrew Block
March 24, 2017
Cover image for the WildFly Swarm cheat sheet
WildFly Swarm Cheat Sheet

WildFly Swarm is a framework for building enterprise Java microservices. By deconstructing the WildFly Application Server into finer-grained components, applications can be designed to make use of only the enterprise Java EE API’s they need and reduce your time to market.

In this cheat sheet, learn how to:

  • Develop a WildFly Swarm application
  • Customize the runtime
  • Configure a WildFly Swarm application
  • Fractions can be added to a WildFly Swarm application

Red Hat’s Andrew Block provides step-by-step guidance to WildFly Swarm.

Cheat Sheet Excerpt

Swarmtool is a standalone jar that can be used to convert an existing jar or war into a swarm application without requiring any other tooling. Existing projects can be run as WildFly Swarm applications in three steps:

1. Download Swarmtool

Swarmtool is available for download in Maven Central by matching the WildFly Swarm version that is referenced in your application’s pom.xml  file:
curl -O<WILDFLY_SWARM_ VERSION>/swarmtool-<WILDFLY_SWARM_VERSION>-standalone.jar

2. Determine options to apply (see table below and apply any option as necessary.)

3. Execute the swarm tool jar via the command line Since the swarmtool jar is executable, it can be renamed to a value which is easier to execute, such as swarmtool. The following command can then be executed:
swarmtool <options> <artifact>

Alternatively, it can be executed using java -jar
swarmtool <options> <artifact>

Want to see more? Get the full cheat sheet.

Tags: wildfly java ee Java wildfly swarm Cheat Sheet microservices