Hi all,
since yesterday I've made some progresses, but I've got even more questions.

First of all, a bit of background information.

As part of SYNCOPE-652 [1], we are implementing multi-tenancy in Apache Syncope. The purpose is to allow situations were a single deployment can serve several different customers, with each customer's data physically separated from each other. Having the internal persistence already based on OpenJPA, slices are the most logical choice.

The work related to SYNCOPE-652 is in a feature branch [2].
I have started with OpenJPA 2.4.0, but since I had to change a couple of things, I've forked (from trunk) and made such changes there [3][4].

In [2] I have changed the OpenJPA configuration from non-slice to a single master slice; with such a configuration [5] (and fixes in OpenJPA mentioned above) I am now able to successfully run unit tests but I still have some troubles with integration tests.
I was also able to run unit tests with a second slice attached.

Questions I've got so far:

1. besides "openjpa.BrokerFactory" to "slice", I also had to set "openjpa.BrokerImpl" to "org.apache.openjpa.slice.DistributedBrokerImpl", but I could not find any reference to this in the slice documentation: is this correct / expected?

2. I had to disable both "openjpa.QueryCache" and "openjpa.QueryCompilationCache": is this correct / expected? what is the impact in terms of performances?

3. Could someone take a look at [3] and [4] and see if such changes make sense for the general case? If so I would be glad to open issue(s) and provide patch(es).

Thanks for your support.
Regards.

[1] https://cwiki.apache.org/confluence/display/SYNCOPE/%5BDISCUSS%5D+Domains
[2] https://github.com/apache/syncope/tree/SYNCOPE-652
[3] https://github.com/ilgrosso/openjpa/commit/4128bcdc06945b07a35d0018cc8fd54a3b472942 [4] https://github.com/ilgrosso/openjpa/commit/58444983be149a2f04008a5a6cc4bb9ded291da5 [5] https://github.com/apache/syncope/blob/SYNCOPE-652/core/persistence-jpa/src/main/resources/persistenceContextEMFactory.xml

--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/


Reply via email to