Please refer to Appendix A, Preparing the Environment and Running Code Samples, if you don't have Java and SBT installed yet.
We will run our application in the terminal by using two separate terminal sessions for Shop and Bakery. It is possible to run both by issuing one of the two following commands in the corresponding shell:
- sbt "runMain ch11.Store"
- sbt "runMain ch11.Bakery"
In our code, we do not handle the StateTimeout for the Shopping/ShoppingList state. Therefore, it is mandatory to start the store session first and after it loads and starts to accept connections stating that the bakery session can be started.
It is also possible to use an approach documented in Appendix A, Preparing the Environment and Running Code Samples, to run the code from within the SBT session and choose the appropriate main class after that...