Hey,

Quoting Rickard Öberg <[email protected]>:
> On 2010-10-01 23.40, Paul Merlin wrote:
> > I face some issues using the Native rdf indexing service within a
> > multi-threaded context.
> > 
> > I have no code to share ATM that demonstrate the issue but if it is
> > needed I'll be able to produce and share it next week.
> > 
> > Let me explain my setup first :
> > - my app is running in a container
> > - on every http request I assemble and activate a qi4j app, process the
> > request and then passivate the qi4j app
> > - some base data is created in the qi4j app (entities inserted, indexed)
> 
> Excuse my ignorance, but that sounds insane! Why are you not
> instantiating and keeping the app? Are you seriously having several
> instance of the same Qi4j app in parallel if there are concurrent
> requests? No wonder there are concurrency issues...

Following what Niclas answered to Stanislav question about many paralled Qi4j 
apps, only the underlying indexer repository (sail) is causing me problems.


> > How do you use indexing-rdf in multi-threaded contexts ?
> 
> I have a servlet that instantiates the Qi4j app, and then delegate to it
> on every request. No issues at all with concurrency.

I use servlets in other projects and it's working flawlessly. In the project 
that caused me a headhache last friday the Qi4j app is behind stateless session 
beans facades (ejb). Because I want to use the filesystem based sail repository 
I reworked my ejb integration so there's now only one Qi4j app accessing it but 
it has drawbacks specifics to the ejb world. I should have given more context 
to 
my question.


Quoting Niclas Hedhman <[email protected]>:
> On Sat, Oct 2, 2010 at 3:44 PM, Stanislav Muhametsin
> <[email protected]> wrote:
> > This is actually quite interesting issue. I could check someday if
> > qi4j-core at least is threadsafe in respect to having many parallel
> > Qi4j-apps.
> 
> It should be. AFAIK, there are no mutable static fields, so the entire
> Qi4j instance should be "invisible" to other ones.

Does this mean that if we use 'out of the jvm' stores and index (entitystore-
rest, entitystore-sql, rdbms based sail repository or indexing-sql) we'll be 
able to run many paralled Qi4j apps ?


/Paul


_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to