This is an example JSR-352 batch running on Wildfly, which
- Loads Data from a File in a Database in Step 1
- And then unload all Data from the Databasein a second step in parallel.
The example consists of unit tests for the reader, processor and writer classes in Step 1 as well as a test script to invoke the batch on wildfly.
The presentation is available at src/site/resources
- Requires Java 11
- Download Wildfly 18 (https://www.wildfly.org/downloads/)
- Unpack ZIP into a local directory
- Set an admin user password
Set a new password for the admin user:
cd $WILDFLY_HOME\bin
./add-user.ps1 -m -u admin -p adminAdd a datasource, our batch can use for reading and writing:
cd $WILDFLY_HOME\bin
.\jboss-cli.ps1 --connect `
--file="...\src\main\resources\wildfly-datasources.cfg"# standalone.conf, standalone.conf.ps1
agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n
mvn clean install- Deploy Application on a local Wildfly server
- Run testcase
BatchIntegrationTest
Deploy the application using maven:
# deploy to local server listening on port 9990
mvn wildfly:deploy