Hi Adrian,
see my replies embedded below.
Regards.
On 31/08/2017 17:14, Adrian Gonzalez wrote:
Hello,
I read that we need to configure OpenJPA 2nd level cache in the
syncope documentation
https://syncope.apache.org/docs/reference-guide.html#high-availability if
I want to use syncope in a cluster.
I have syncope running in the cloud (with dynamic scalability and
dynamic ips), so I'll have some issues configuring with fixed ips and
a fixed number of instances.
i.e. <property name="openjpa.RemoteCommitProvider"
value="tcp(Addresses=10.0.1.10;10.0.1.11)"/>
Of course: in such cases you should be using JMS rather than TCP:
http://openjpa.apache.org/builds/2.4.2/apache-openjpa/docs/ref_guide_event.html#ref_guide_event_conf_jms
I'm only using Syncope Core (aka REST Services), not the console or
end-user app.
For the moment, I didn't activate the RemoteCommitProvider settings
(and hence have the sjvm), and I'm running in some NPE errors when
calling /syncope/rest/users/self REST API in one instance (but on the
other with exactly the same parameter, it just works).
See [1] for the stacktrace
I'd like to know if I can just disable JPA 2nd level cache (I'm only
using Syncope core) or if I'm going to run in some rough issues ?
<shared-cache-mode>NONE</shared-cache-mode>
That's very likely: the 2nd level cache is what glues together the
various OpenJPA instances (e.g. Syncope Core instances) in the cluster.
You might try to disable all sort of JPA caches, but there is no
guarantee that things keep working.
Regards.
--
Francesco Chicchiriccò
Tirasa - Open Source Excellence
http://www.tirasa.net/
Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/