WildFly Swarm Initial Release

Happy Cinco De Mayo!

Crack open a cold adult beverage and start retooling your JavaEE skills towards microservices.

What is WildFly Swarm?

WildFly Swarm [1] is a new sidecar project supporting WildFly 9.x to enable deconstructing the WildFly AS and pasting just enough of it back together with your application to create a self-contained executable jar.

JAX-RS is a microservice?

In the simplest case, you make small adjustments to your existing Maven pom.xml that generates a WAR file and you’ll get another artifact with a name akin to myproject-1.0-swarm.jar.

Simply add the wildfly-swarm-plugin to your pom.xml:


Add a <dependency> block or two:


Build your project:

mvn package

And run that sucker:

java -jar ./target/myproject-1.0-swarm.jar

Can I get fancier?

You betcha!

Since WildFly Swarm is based upon WildFly 9.x, you have most of the power of WildFly available to you. This includes subsystems such as:

  • Undertow (Servlets)

  • JAX-RS

  • Naming/JNDI

  • Transactions

  • Messaging

  • Datasources

  • Logging

  • Weld (CDI)

  • JBoss MSC

  • Security

Additionally, if you want to provide your own main(…​) method to instantiate the Container, configure some of the subsystems, and perform whatever deployments you need, that’s possible also!

public class Main {

    public static void main(String[] args) throws Exception {
        Container container = new Container();

        container.subsystem(new MessagingFraction()
                                new MessagingServer()

        // Start the container

        JaxRsDeployment appDeployment = new JaxRsDeployment();

        // Deploy your JAX-RS app

        // Create an MSC deployment
        ServiceDeployment deployment = new ServiceDeployment();
        deployment.addService(new MyService("/jms/topic/my-topic" ) );

        // Deploy the services
        container.deploy( deployment );

Can I use it in production?

We wouldn’t recommend it. We just released 1.0.0.Alpha1. It’s pretty new and we’re sure there’s some dark corners that we have not addressed.

If you come across any issues or desire any improvements, file an issue over at GitHub, and we’ll do our best to make you happy.

Do you have more examples?

What do I download?

There is no special download or installation instructions. Simply start using org.wildfly.swarm artifacts in your pom.xml, throw in the plugin and continue doing your builds. Everything is available through Maven Central.

Stay in Touch

You can keep up with the project through the WildFly HipChat room, @wildflyswarm on Twitter, or through GitHub Issues.

1. never to be called just "Swarm", because Legal