I just created an example Scala/Lagom application following the Akka Persistence (Typed) documentation and the shopping-cart example project: lagom-samples/shopping-cart/shopping-cart-scala/shopping-cart/src/main/scala/com/example/shoppingcart/impl at 1.6.x · lagom/lagom-samples · GitHub
There seems to be an issue with initialization order as the Akka Persistence components try to set up the journal and snapshot stores as
slickProvider has not yet set up JNDI bindings (because nothing has referenced it yet). This problem goes away if the application explicitly references the
slickProvider, or if the application uses the
persistentEntityRegistry. I think the shopping-cart example project does not have this issue because it injects
persistentEntityRegistry into the service implementation (for use by the topic producer), or perhaps because it has a repository which references the
I am wondering what the proper way to initialize my application is, in lieu of not having a repository or topic producer in my service.
A full reproducer is here: GitHub - solarmosaic-kflorence/lagom-2431-reproducer