The RemoteRepositoryManager needs to be available from the RemoteRepository in order to support the transaction service (which is 1:1 with the database, not the namespace). This means that the RemoteRepositoryManager can no longer extend RemoteRepository. Instead, we need to obtain a RemoteRepository from the RemoteRepositoryManager. There are already methods for this. We can also add a getRemoteRepositoryForDefaultNamespace() for convenience.
The recommended pattern is as follows.
This pattern makes it possible to:
- Obtain BigdataSailRemoteRepository objects for different sparql end points on the same blazegraph server.
- Those BigdataSailRemoteRepository objects are flyweight.
- The RemoteRepositoryManager can be used to access additional interfaces, including the multi-tenancy API and the transaction API.
See BLZG-1195 Read/write tx support in NSS and BigdataSailRemoteRepositoryConnection