Hi Alessio,
I was wondering if you made any progress on this, it seems like as
interesting use case.
Regards.
On 25/10/2016 13:28, Francesco Chicchiriccò wrote:
On 25/10/2016 10:32, Alessio Maccioni wrote:
Hello,
We are trying to deploy Syncope v2.0.1 into a Tomcat 8 AS. Package is
built using latest version of Maven.
We are using latest Postgres-XL as DB container via JDBC connector.
All settings are done as reference guide.
Since XL’s “CREATE TABLE” logica is different from classic Postgres,
we need to specify how tables will be distributed into datanodes,
otherwise we get an error during constraints initialization
(Postgres-XL’s distribution table is by HASH default).
Inspecting .WAR files I just found and edited audit & quartz SQL
instructions, but i can’t find main tables ones.
Can you point me to the right direction?
Hi Alessio,
even if I am personally a bug fun of PostgreSQL, I wasn't aware of
Postgres-XL: it looks definitely cool [1].
If you need to tweak the whole SQL schema creation, you will have to:
1. provide your own SQL script based on [2], save it as
core/src/main/resources/quartz/tables_pgxl.sql, change
provisioning.properties accordingly
2. provide your own SQL script based on [3], place it under
core/src/main/resources/audit/audit_pgxl.sql, add
Master.audit.sql=audit_pgxl.sql to Master.properties
3. pre-populate your DB instance with the full, OpenJPA-generated SQL
schema
You can achieve the last item in two different ways:
1. (simpler) run your project on a plain PostgreSQL instance: this
will create the SQL schema and fill the table with some values; at
that point, dump the DB in a SQL script file, manually tweak it to
work with Postgres-XL, and load it there; finally, run again your
project against Postgres-XL
2. (more involved): configure the OpenJPA Maven plugin in your
core/pom.xml (take [4] as reference) to generate the SQL schema
file for PostgresQL, then manually tweak it to work with
Postgres-XL, and load it there; finally, run your project against
Postgres-XL
HTH
Regards.
[1] http://www.postgres-xl.org/
[2]
https://github.com/apache/syncope/blob/syncope-2.0.1/core/provisioning-java/src/main/resources/quartz/tables_postgres.sql
[3]
https://github.com/apache/syncope/blob/syncope-2.0.1/core/persistence-jpa/src/main/resources/audit/audit.sql
[4]
https://github.com/apache/syncope/blob/syncope-2.0.1/core/persistence-jpa/pom.xml#L217-L230
--
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/