This content has been marked as final.
Show 2 replies
-
1. Re: How to start a cache from tomcat on context initialization?
galder.zamarreno Feb 17, 2016 7:30 AM (in response to stejas7)You should check servlet lifecycle callbacks (e.g. read the spec ) and create/destroy the remote cache manager and get a reference to the remote cache in those callbacks.
-
2. Re: How to start a cache from tomcat on context initialization?
vdzhuvinov Feb 17, 2016 8:31 AM (in response to stejas7)We're doing something similar in our app, starting Infinspan in a ServletContextListener and then exporting the cache mgr to the servlet context where other app components can make use of it.
Make sure the class is properly annotated, or declared in as ServletContextListener in web.xml
This is the source code: