Ds 3552 read only context and hibernate improvements (#1694)

* Refactor READ ONLY mode in Context and adjust hibernate settings accordingly

* Set Context in READ-ONLY mode when retrieving community lists

* Fix Hibernate EHCache configuration + fix some Hibernate warnings

* Cache authorized actions and group membership when Context is in READ-ONLY mode

* Set default Context mode

* Let ConfigurableBrowse use a READ-ONLY context

* Add 2nd level cache support for Site and EPerson DSpaceObjects

* Added 2nd level caching for Community and Collection

* Fix tests and license checks

* Cache collection and community queries

* Small refactorings + backwards compatibility

* Set Context to READ-ONLY for JSPUI submissions and 'select collection' step

* OAI improvements part 1

* OAI indexing improvements part 1

* OAI indexing improvements part 2

* DS-3552: Only uncache resource policies in AuthorizeService when in read-only

* DS-3552: Additional comment on caching handles

* DS-3552: Fix cache leakage in SolrServiceResourceRestrictionPlugin

* DS-3552: Clear the read-only cache when switching Context modes

* DS-3552: Correct Group 2nd level cache size

* DS-3552: Always clear the cache, except when going from READ_ONLY to READ_ONLY
This commit is contained in:
Tom Desair (Atmire)
2017-05-04 20:12:06 +02:00
committed by Tim Donohue
parent 9f46a1b812
commit 1ccd6d1e13
34 changed files with 1554 additions and 118 deletions

View File

@@ -84,7 +84,7 @@ public class RDFizer {
this.dryrun = false;
this.lang = "TURTLE";
this.processed = new CopyOnWriteArraySet<UUID>();
this.context = new Context(Context.READ_ONLY);
this.context = new Context(Context.Mode.READ_ONLY);
this.configurationService = DSpaceServicesFactory.getInstance().getConfigurationService();
this.contentServiceFactory = ContentServiceFactory.getInstance();
@@ -818,7 +818,7 @@ public class RDFizer {
// data into a triple store that provides a public sparql endpoint.
// all exported rdf data can be read by anonymous users.
// We won't change the database => read_only context will assure this.
Context context = new Context(Context.READ_ONLY);
Context context = new Context(Context.Mode.READ_ONLY);
RDFizer myself = null;
myself = new RDFizer();