A simple simulation of a rocket factory using JMS. There are four different type of people responsible for the creation of a rocket:
- Supplier
- Worker
- Quality Tester
- Logistician
Suppliers can be created using the Graphical User Interface FireWorks. Workers, Quality Testers, and Logistician are all simple command line programs.
To compile and execute the programs contained in this repository you need the following software components:
- Add an application user
- Unix:
add-user.sh -a -u 'fireworks' -p 'fireworks' -g 'guest' - Windows:
add-user.bat -a -u 'fireworks' -p 'fireworks' -g 'guest'
- Start the web server
- Unix:
standalone.sh -c standalone-full.xml - Windows:
standalone.bat -c standalone-full.xml
- Add the configuration data to the web server
- Unix:
jboss-cli.sh --connect --file=configure-jms.cli - Windows:
jboss-cli.bat --connect --file=configure-jms.cli
If you want to remove the configuration data you can do so by issuing the following command while the server is running:
- Unix:
jboss-cli.sh --connect --file=remove-jms.cli - Windows:
jboss-cli.bat --connect --file=remove-jms.cli
If you want to remove the queue data generated by the application you can do so by removing the folder standalone/data inside the WildFly installation directory.
Use the following command to compile all programs contained in the repository:
mvn compileBefore executing any of the following commands please make sure that WildFly is running and that you followed the steps outlined in the section configuration.
To start the graphical user interface you can use the following Maven command:
mvn exec:java -PFireWorksTo add suppliers use the button New Order. You can edit the different attributes for a supplier by double clicking the cell for the corresponding attribute. If you are happy with the current selection of suppliers you can use the button Start Suppliers to activate them.
To start a worker using the default ID specified in pom.xml use the following command:
mvn exec:java -PWorkerYou can also specify the ID when you start a worker. The following command starts a worker with ID 3:
mvn exec:java -PWorker -Dworker.id=3The command line arguments for the quality tester are the same as the ones for the worker. To start a tester you can use the Maven profile Tester. The following command starts a quality tester using the default arguments specified in pom.xml.
mvn exec:java -PTesterThe logistician has the same command line arguments as the worker and tester. You can use the Maven profile Logistic to start a logistic worker:
mvn exec:java -PLogistic