What is the best way to make threadsafe HashMap in Tomcat ?I'm going to create ConcurrentHashMap on InitServlet once on load on my application.
(<load-on-startup>1</load-on-startup>)
Requests from different threads will read and write data to my ConcurrentHashMap. I'm not good in mutlithreading, so not sure is it approach correct?
And where is the best place to put this HashMap should i make it static ?
Thank you