incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rupert Westenthaler <>
Subject SingleDatasetTdbTcProvider - CLEREZZA-691 (was Re: filling up with ontonet files)
Date Tue, 19 Jun 2012 11:41:28 GMT
Hi all

Today I found some time to implement the remaining changes to the
SingleDatasetTdbTcProvider. Here is a short Overview

* It supports multiple Instances (configurationFactory=true): This
allows users to manually configure multiple TDB datasets
    * This means that it is still possible to have totally independent
RDF datasets
    * Users that create additional instances for special usages should
assign low service rankings so that the Clerezza TcManager uses the
default instance to create new graphs
* It uses configuration policy OPTIONAL: This means that by default an
instance with the default parameter is created
    * you can still configure the default instance by providing a
configuration with the name
to the "Configuration Admin Service"
* It supports read-only access to the UNION graph - to enable this
feature users need to configure the URI of the union graph

### Configurations (and defaults)

* service ranking = 106 : This is higher as the old TdbTcProvider - so
the SingleDatasetTdbTcProvider will be preferable used.
* storage location : {bundle-data-dir}/singleTdb/{}
   * the service ID of the default instance is the class name of the
component implementation - "SingleDatasetTdbTcProvider"
   * can be configured by the "tdb-dir" property of the configuration.
   * if you change the value of the "tdb-dir" property data of the
current storage location will NOT be copied
   * if the value of the "tdb-dir" property points to an existing Jena
TDB dataset the SingleDatasetTdbTcProvider will be initialized using
the existing data.
* default-graph-name: The URI used to expose the UNION graph via the TcProvider.
   * This allows users to lookup the UNION graph via the TcManager interface.
   * If this configuration is missing or empty the UNION graph feature
is deactivated.

### Dealing with multiple instances

Via the TcManager interface the TcProvider with the highest ranking
will be used to create new graphs. So this interface can not directly
used to work with multiple instances.

However OSIG filter can be easily used to query/inject a specific
TcProvider. In case of the SingleDatasetTdbTcProvider the
"default-graph-name" is best suited for that. Creating/using such an
filter is quite easy:

    ServcieReference[] refs = bundleContext.getServiceReferences(

### Version Management

The changes are applied to the trunk. The current version of the bundle is


It runs fine with the currently released versions of the dependencies.
So for Apache Stanbol users it should be enough to replace the
"0.5-incubating" version with the "0.6-incubating-SNAPSHOT".

Happy testing,


On Thu, Apr 5, 2012 at 4:03 PM, Reto Bachmann-Gmür <> wrote:
> On Thu, Apr 5, 2012 at 1:16 PM, Rupert Westenthaler <
>> wrote:
>> Von meinem iPad gesendet
>> Am 05.04.2012 um 12:59 schrieb Reto Bachmann-Gmür <>:
>> > Hi Rupert,
>> >
>> > I like your proposal but would suggest:
>> > - SingleDatasetTdbTcProvider should not need a directory configured
>> No problem with that. One can use the configuration policy OPTIONAL, than
>> OSGI will create a default instance with the default directory while it
>> would still be possible for users to creat additional instances with
>> manually configured directories.
> Not sure why one would need to create multiple SingleDatasetTdbTcProviderS.
> With the current limitation of TcManager I don't think there's much use in
> having multiple instances, but of course I wouldn't mind having this
> possibility.
> Cheers,
> Reto

| Rupert Westenthaler   
| Bodenlehenstraße 11                             ++43-699-11108907
| A-5500 Bischofshofen

View raw message