On 05/08/15 16:37, Darren Everley wrote:
Fellow Jena users I'm looking for some guidance and clarification for
integrating Jena into a project that is hosted within a Java EE container;
currently Glassfish for development purposes.
The scenario is that users will be concurrently inspecting/manipulating
different RDF models that have OWL ontologies associated with them.
My understanding is that the ModelFactory associates the created Model
class instances with OntModel class instances and therefore in my target
environment I will encounter 'clashes' and therefore unpredictable behavior.
My question is firstly, is my understanding correct? And secondly if not
then which helpful class(es) have I missed as I am new to Jena.
Kind Regards
Darren
Darren,
ModelFactory creates in-memory models. You'll need to ensure that
working with the data is MRSW (multi-reader OR a single writer). There
is support for this:
http://jena.apache.org/documentation/notes/concurrency-howto.html
Do consider putting the data in TDB and using database transactions (it
gives you Multiple reader AND a single writer : MR+SW). Or using Fuseki
as a database server shared across app servers.
From Westbury-on-Trym,
Andy