USING JUMPSTART IN WILDFLY 11.0.0

WildFly is the free community version of JBoss Application Server. These notes apply to WildFly 11.0.0. They were tested with JumpStart 7.0.1.

Contents
Prepare WildFly
Build and deploy JumpStart
Build and deploy and integration test JumpStart
Use JumpStart
How to run integration tests from Eclipse
How to debug the client side
How to debug the server side

Prepare WildFly
These instructions prepare WildFly with the following elements:

Web Server Business Server Persistence Database Server Logger
Undertow WildFly's EJB3 Hibernate H2 Log4j
(WildFly's default) (WildFly's default) (WildFly's default) (WildFly's default) (WildFly's default)

Build and deploy JumpStart

Here we use Ant to clean, compile, unit test, package, deploy to the server, and wait for it to load.
The deployed package is jumpstart.ear.

Build and deploy and integration test JumpStart

Here we use Ant to clean, compile, unit test, package, deploy to the server, wait for it to load, and run the business integration test suite.
The deployed package is jumpstart.ear. The tests remotely call the JumpStart business layer services exposed by the server.

Use JumpStart

Ensure the command line is using Java 8: the commands java -version and javac -version must return a variant of 1.8, eg. 1.8.0_101.

If WildFly is running, stop it (Ctrl-C).

Before you use JumpStart for the first time in a new server, you need to build it, deploy it, and run the integration tests.

Populate the H2 Database within WildFly with data. H2 provides a handy console to edit the database:

Start WildFly. Now you can visit JumpStart with your web browser at http://yourserver:8080/jumpstart.

How to run integration tests from Eclipse

First, build and deploy JumpStart as described above.

Second, create a User Library over WildFly:

Third, run the business integration test suite from Eclipse:

  • Choose Run > Run Configurations.... The relevant window will appear.
  • Right-click on JUnit and choose New.
  • Set Test Runner to JUnit 4.
  • Set the other variables to values similar to those shown in the screen shot on the right.
  • Click on the Arguments tab.
  • Set the VM arguments to the following:
    -Djumpstart.ejb-provider=WILDFLY_11_REMOTE
    -Dlog4j.configurationFile=log4j.properties
  1. Click on the Classpath tab.
  2. Remove the (default classpath) entry.
  3. Click on User Entries.
  4. Add these 2 folders (Advanced... > Add folders):
    business/src/test/conf-remote-wildfly/
    collapsed/jumpstart.war/WEB-INF/classes/
  5. Add all JARs from these folders:
    business/src/main/lib-compile/
    business/src/main/lib-runtime/ (actually, lib-runtime is empty)
    business/src/test/lib-test/
  6. Add 1 user library (Advanced... > Add Library > User Library):
    wildfly-11.0.0-client-lib
  7. Move the two folders to the top. It avoids conflicts.

How to debug the client side

To debug, for example, the client side of the integration tests, use Run > Debug Configurations... instead of Run > Run Configurations.... Eclipse will then stop at breakpoints, display variables, enable single-stepping, etc. in the test suite.

How to debug the server side

To debug any part of JumpStart as it runs in the server you'll need to be running WildFly in debug mode. There are a couple of ways to do it:

 












©2017, 2018 Geoff Callender, Sydney, Australia