You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Mark Roth <Ma...@twosigma.com> on 2012/03/12 19:49:41 UTC
SDB threading questions
I have some questions about SDB threading. Forgive me if these are addressed in the documentation - I tried to search but didn't find what I was looking for:
1. Can I have multiple Store objects in the same VM attached to the same SQL back-end?
2. Can multiple threads access the same Store instance simultaneously, or does access need to be synchronized?
3. Can multiple VMs attach to the same SDB SQL back-end and can they read simultaneously while another VM is performing a transactional commit?
Thanks,
- Mark
RE: SDB threading questions
Posted by Mark Roth <Ma...@twosigma.com>.
Awesome! This is about the best I could hope for.
I would recommend making this information easier to find somewhere in the documentation.
Thanks!
- Mark
-----Original Message-----
From: Andy Seaborne [mailto:andy.seaborne.apache@gmail.com] On Behalf Of Andy Seaborne
Sent: Monday, March 12, 2012 3:19 PM
To: jena-users@incubator.apache.org
Subject: Re: SDB threading questions
On 12/03/12 18:49, Mark Roth wrote:
> I have some questions about SDB threading. Forgive me if these are addressed in the documentation - I tried to search but didn't find what I was looking for:
>
A Store is a wrapper around a JDBC connection ....
> 1. Can I have multiple Store objects in the same VM attached to the same SQL back-end?
Yes
> 2. Can multiple threads access the same Store instance simultaneously, or does access need to be synchronized?
Yes
>
> 3. Can multiple VMs attach to the same SDB SQL back-end and can they read simultaneously while another VM is performing a transactional commit?
Yes
Related:
http://incubator.apache.org/jena/documentation/sdb/javaapi.html#connection_management
The only thing to be careful about is if the two Store object are
sharing a JDBC connection (a common SDBConnection object). Then, there
is no transactional separation; it's just like using the same JDBC
connection across threads.
Andy
Re: SDB threading questions
Posted by Andy Seaborne <an...@apache.org>.
On 12/03/12 18:49, Mark Roth wrote:
> I have some questions about SDB threading. Forgive me if these are addressed in the documentation - I tried to search but didn't find what I was looking for:
>
A Store is a wrapper around a JDBC connection ....
> 1. Can I have multiple Store objects in the same VM attached to the same SQL back-end?
Yes
> 2. Can multiple threads access the same Store instance simultaneously, or does access need to be synchronized?
Yes
>
> 3. Can multiple VMs attach to the same SDB SQL back-end and can they read simultaneously while another VM is performing a transactional commit?
Yes
Related:
http://incubator.apache.org/jena/documentation/sdb/javaapi.html#connection_management
The only thing to be careful about is if the two Store object are
sharing a JDBC connection (a common SDBConnection object). Then, there
is no transactional separation; it's just like using the same JDBC
connection across threads.
Andy