Theme: Build a simple ticket management system using Java EE (Jakarta) and communication protocols UDP, AMQP, REST, and gRPC.
- The server needs to be started first
- Import the Project in IntelliJ/Eclipse, with root directory ticketservice
- If your JDK version is less than 11 you need to set 'sourceCompatibility' in build.gradle to that number
- Open TicketServerMain.java
- Eclipse:
- click Run > Run Configurations > Java Application > New Configuration
- The config will be generated, you only need to set "Program arguments" in the "Arguments" tab
- Example: localhost 1234
- IntelliJ
- click on green trinagle next to the main-method of TicketServerMain > create 'TicketServerMain.main()'
- the config is generated, you only need to set 'Program arguments'
- Eclipse:
- Run/Debug the configuration
The shared project is automatically build before the server is started. Look at the dependencies block in the server/build.gradle.
- Create a Run-Configuration for Main.java with the necessary program arguments, the same way as for the server
- Program arguments example: udp localhost 1234
- Run/Debug the configuration
- For testing purposes the client configuration can be run multiple times from the same machine(at least in IntelliJ). When closing one client all of close.
The shared project is automatically included in the dependencies of the client and server.
If you are interested inspect the idistrsys/build.gradle to see all the relevant settings, configurations and tasks.