Is it ok to have a REST Webservice (Spring and Jersey) that uses a DAO with a ConcurrentHashMap
to store the data, or should I avoid it and use some kind of in-memory DB?
It's an sample application, so I don't mind losing the data every time the application stops.
You can use ConcurrentHashMap, but you will have some difficulties when:
ConcurrentHashMap is for other purposes. So, I'll advise to use any in-memory DB.