DSpace/DSpace — pull request #561 by peterdietz (2014-07-03 19:48:45+00:00)
Title: DS-1986 REST to use new context for each request

This fixes: https://jira.duraspace.org/browse/DS-1986

Where previously REST had to cache org.dspace.core.Context, and hold it forever. Caching the context is bad, it causes stale data. Fixing this was easy, thanks for @RichardRodgers advice at OR2014, i.e. close the context in the finally.

I've JMETER tested all the rest methods after this change, and the performance is fine. I don't notice any issue with not caching the context, and the error rate is 0 as before.

This fix should apply to DSpace 4.2, and to DSpace 5.x