JBoss AS has a new name: as you probably know future versions of the application server will be named Wildfly. Let's have our first taste of WildFly 8

Start by downloading the Wildfly application server from http://www.wildfly.org/ . Luckily the new application server release is not a radical departure from the 7.x releases ! In terms of development, the most important hightlight of this new server version is the Java EE 7 specification which has been recentely released (http://java.net/projects/javaee-spec/downloads).
Along with this, you need to be aware that the new server contains a new module filesystem layout (which has been already introduced in JBoss EAP 6.1)
Basically the new modules file system layout is organized as follows:

jboss 8 wildfly jboss 8 wildfly jboss 8 wildfly jboss 8 wildfly
The system root level is used to separate modules associated with the distribution base from add-ons and other modules that you can add to customize your distribution. Because of the new module file system, the older JBoss Tools plugin will not be able to configure WildFly as Server. For this purpose we suggest the following environemt:

  • JBoss Tools 4.1.1 
  • Eclipse Kepler 4.3.1

Once installed JBoss Tools from Eclipse Market Place, define a new WildFly Server as shown by the following picture:
jboss 8 wildfly jboss 8 wildfly jboss 8 wildfly jboss 8 wildfly

On the other hand, in this example we will use Maven and the Maven WildFly plugin to compile and deploy our application which uses an EJB 3.2 feature that enables excluding passivation on a component basis, either by annotations or by the ejb-jar.xml configuration file. So let's create a simple Maven project which uses a javaee6-webapp archetype and then add the following EJB to your project:

package com.sample;
public class NoPassivation {
    int total =0;
    public void sum(int i) {
    public int getTotal() {
        return total;


In order to test our EJB just add a simple Servlet which invokes the NoPassivation EJB a couple of times:
    NoPassivation ejb;
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        PrintWriter out = response.getWriter();
        out.println("Hello from EJB 3.2 on WildFly");
        out.println("Total "+ejb.getTotal());

Finally a pom.xml which is based on jboss-javaee-6.0 BOM but includes the jboss-ejb-api_3.2_spec Alpha version:     
<?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">




        <!-- maven-compiler-plugin -->

            <id>JBoss Repository</id>



        <!-- Import the Common Annotations API (JSR-250) -->




Package and compile with:

mvn install wildfly:deploy		

That's all! Enjoy Wildfly 8 !


Related articles available on mastertheboss.com

Configuring Eclipse to use WildFly

How do I integrate WildFly with Eclipse? This tutorial shows how

Maven configuration for Java EE 7 projects on WildFly

In this tutorial we will learn how to configure Maven Project Obj

Running WildFly with JDK 8

The JDK 1.8 early access is available for download at Oracle's si

Patching WildFly application server

The final version of WildFly 8.1.0 has been released and it conta

Configuring WildFly Batch Job Repository

WildFly ships with a subsystem named batch which is the administr

Monitoring WildFly using VisualVM

This short tutorial shows how you can connect to WildFly 8 using