Re: ClosedException on calling Individual.isClass()

2017-01-03 Thread Andy Seaborne
On 02/01/17 13:53, George News wrote: On 02/01/2017 14:43, Andy Seaborne wrote: On 02/01/17 12:37, George News wrote: Are there any kind of models available in current Jena version? I was storing the Dataset using TDB. Then I call getNamedModel() on the dataset and work with it or just

Re: ClosedException on calling Individual.isClass()

2017-01-02 Thread George News
On 02/01/2017 14:43, Andy Seaborne wrote: > > > On 02/01/17 12:37, George News wrote: >> Are there any kind of models available in current Jena version? I was >> storing the Dataset using TDB. Then I call getNamedModel() on the >> dataset and work with it or just with the in-memory. > > These

Re: ClosedException on calling Individual.isClass()

2017-01-02 Thread Andy Seaborne
On 02/01/17 12:37, George News wrote: Are there any kind of models available in current Jena version? I was storing the Dataset using TDB. Then I call getNamedModel() on the dataset and work with it or just with the in-memory. These don't need closing either. A graph is a stateless

Re: ClosedException on calling Individual.isClass()

2017-01-02 Thread George News
On 02/01/2017 13:57, A. Soroka wrote: >>> Since all your models seem to be in-memory then you could simply drop >>> the close(), it's not necessary here. >> >> Are there any kind of models available in current Jena version? I was >> storing the Dataset using TDB. Then I call getNamedModel() on

Re: ClosedException on calling Individual.isClass()

2017-01-02 Thread A. Soroka
>> Since all your models seem to be in-memory then you could simply drop >> the close(), it's not necessary here. > > Are there any kind of models available in current Jena version? I was storing > the Dataset using TDB. Then I call getNamedModel() on the dataset and work > with it or just with

Re: ClosedException on calling Individual.isClass()

2017-01-02 Thread George News
On 02/01/2017 13:00, Dave Reynolds wrote: >> >> Yes it does. I want to speedup things, as ontologies are not changing. >> >> >> >> true >> true >> >> >>> Does the code you haven't shown us close your OntModels somewhere? >> >> I call OntModel close on local models vars. But each

Re: ClosedException on calling Individual.isClass()

2017-01-02 Thread Dave Reynolds
On 02/01/17 11:22, George News wrote: On 02/01/2017 11:03, Dave Reynolds wrote: On 02/01/17 09:23, George News wrote: On 31/12/2016 16:42, Andy Seaborne wrote: sometime when concurrently calling the webservice Having code fragment does not help here - could it be that one request is

Re: ClosedException on calling Individual.isClass()

2017-01-02 Thread George News
On 02/01/2017 11:03, Dave Reynolds wrote: > On 02/01/17 09:23, George News wrote: >> >> On 31/12/2016 16:42, Andy Seaborne wrote: >>> sometime when concurrently calling the webservice >>> >>> Having code fragment does not help here - could it be that one >>> request is doing >>> >>>

Re: ClosedException on calling Individual.isClass()

2017-01-02 Thread Dave Reynolds
On 02/01/17 09:23, George News wrote: On 31/12/2016 16:42, Andy Seaborne wrote: sometime when concurrently calling the webservice Having code fragment does not help here - could it be that one request is doing Individual.isClass() while another is closing the model? if so, why is one

Re: ClosedException on calling Individual.isClass()

2017-01-02 Thread George News
On 31/12/2016 16:42, Andy Seaborne wrote: > >> sometime when concurrently calling the webservice > > Having code fragment does not help here - could it be that one > request is doing > > Individual.isClass() > > while another is closing the model? > > if so, why is one request closing a

Re: ClosedException on calling Individual.isClass()

2016-12-31 Thread Andy Seaborne
> sometime when concurrently calling the webservice Having code fragment does not help here - could it be that one request is doing Individual.isClass() while another is closing the model? if so, why is one request closing a shared object? Either keep the object open, or make a fresh

ClosedException on calling Individual.isClass()

2016-12-30 Thread George News
Hi all, I'm facing a really strange problem when concurrently using a model. I have created a REST webservice which is running some tasks on a model sent through a POST. In this code, I have created an OntModel and add a resource description to it. I loop over all the statements to check and