On 16/07/2015 13:47, Francesco Chicchiriccò wrote:
On 16/07/2015 13:45, Francesco Chicchiriccò wrote:
Hi all,
at Syncope we are implementing the multi-tenancy feature [1], which requires - at least for the way how we thought at it - to extend the current OpenJPA-based persistence layer with slices.

I am unfortunately experiencing some troubles, so I've assembled a quickstart project to show my problems [2], which replicates most of Syncope settings.

You can verify that, after issuing

mvn clean test

all tests (but one, which is rather irrelevant since it does not perform any database operation) are failing; if, instead, a single test method is invoked as

mvn clean test -Dtest=RealmTest#save

everything is working as expected (this is true for every single test method).

The relevant part of the stacktrace is at [3]: as you can see, it seems that there are problems related to transaction completion.

You can find the OpenJPA setup in [3]

at [4], sorry

- as you can see the application is Spring-managed; please note that I had to explicitly set "openjpa.BrokerImpl" to "org.apache.openjpa.slice.DistributedBrokerImpl", otherwise nothing was working at all.

Is there anything obvious that I am currently overlooking?

Update: when disabling QueryCompilationCache

https://github.com/ilgrosso/OpenJPASlice/blob/master/src/main/resources/persistenceContextEMFactory.xml#L59

all tests are now working altogether.

Can you confirm that my configuration is correct / expected?

[1] https://cwiki.apache.org/confluence/display/SYNCOPE/%5BDISCUSS%5D+Domains
[2] https://github.com/ilgrosso/OpenJPASlice/
[3] https://paste.apache.org/b5ot
[4] https://github.com/ilgrosso/OpenJPASlice/blob/master/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