I believe what you want to do is initialize an actor system within the servlet context. This question/answer should help. Don't forget to include the ContextListener
in your web.xml
.
Custom startup in servlet
-
28-06-2022 - |
Question
I'm creating an atmosphere servlet application, which uses the following servlet in web.xml https://atmosphere.java.net/nonav/apidocs/org/atmosphere/cpr/AtmosphereServlet.html.
When this service starts up I would like to start to an Akka actor system and have it available throughout the life of the application.
How is this done?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow