-
Nov 21st, 2011, 04:21 AM
#1
JSON Jackson based Service w/ ConcurrentHashMap?
Hi -
New here. Looked around and couldn't find a more relevant forum. Apologies if my question is not in the best forum.
I'm working on a project that requires JSON. I've been working through the following blog article that provides example source for building a JSON based data service.
http://blog.springsource.org/2010/01...in-spring-3-0/
The example source uses a ConcurrentHashMap to store result data to be serialized. Why not a simple Hashmap? I also noticed that the Jackson library uses this type although I can't find any discussion of it's usage.
Does this provide some kind of caching benefit? I don't see how to the service should require this. From what I understand this is recommended for dealing with concurrency and typically multi-threading. Is this a standard best practice for exposing data from a web service? Anyone know of a good keyword to describe this approach or where to find more information?
I can't find any relevant information to describe this particular topic. Is this simply used incorrectly in the example? Or perhaps the example leaves out this detail?
Thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules