The following topics are covered:
eXo JCR persistent data container can work in two configuration modes:
Multi-database: One database for each workspace (used in standalone eXo JCR service mode)
Single-database: All workspaces persisted in one database (used in embedded eXo JCR service mode, e.g. in eXo portal)
The data container uses the JDBC driver to communicate with the actual database software, i.e. any JDBC-enabled data storage can be used with eXo JCR implementation.
Currently the data container is tested with the following configurations:
MySQL 5.0.18 MYSQL Connector/J 5.0.8
MySQL 5.1.36 MYSQL Connector/J 5.1.14
PostgresSQL 8.2.4 JDBC4 Driver, Version 8.2-507
PostgresSQL 8.3.7 JDBC4 Driver, Version 8.3-606
Oracle DB 10g R2 (10.2.0.4), JDBC Driver Oracle 10g R2 (10.2.0.4)
Oracle DB 11g R1 (11.1.0.6.0), JDBC Driver Oracle 11g R1 (11.1.0.6.0)
Oracle DB 11g R2 (11.2.0.1.0), JDBC Driver Oracle 11g R2 (11.2.0.1.0)
DB2 9.7.4 IBM Data Server Driver for JDBC and SQLJ (JCC Driver) v.9.7
MS SQL Server 2005 SP3 JDBC Driver 3.0
MS SQL Server 2008 JDBC Driver 3.0
Sybase 15.0.3 ASE Driver: Sybase jConnect JDBC driver v7 (Build 26502)
HSQLDB (2.0.0)
Each database software supports ANSI SQL standards but also has its own specifics. So, each database has its own configuration in eXo JCR as a database dialect parameter. If you need a more detailed configuration of the database, it's possible to do that by editing the metadata SQL-script files.
SQL-scripts you can obtain from jar-file exo.jcr.component.core-XXX.XXX.jar:conf/storage/. They also can be found at SVN here.
In the next two tables correspondence between the scripts and databases is shown.
| MySQL DB | jcr-sjdbc.mysql.sql |
| MySQL DB with utf-8 | jcr-sjdbc.mysql-utf8.sql |
| MySQL DB with MyISAM* | jcr-sjdbc.mysql-myisam.sql |
| MySQL DB with MyISAM and utf-8* | jcr-sjdbc.mysql-myisam-utf8.sql |
| PostgresSQL | jcr-sjdbc.pqsql.sql |
| Oracle DB | jcr-sjdbc.ora.sql |
| DB2 | jcr-sjdbc.db2.sql |
| MS SQL Server | jcr-sjdbc.mssql.sql |
| Sybase | jcr-sjdbc.sybase.sql |
| HSQLDB | jcr-sjdbc.sql |
| MySQL DB | jcr-mjdbc.mysql.sql |
| MySQL DB with utf-8 | jcr-mjdbc.mysql-utf8.sql |
| MySQL DB with MyISAM* | jcr-mjdbc.mysql-myisam.sql |
| MySQL DB with MyISAM and utf-8* | jcr-mjdbc.mysql-myisam-utf8.sql |
| PostgresSQL | jcr-mjdbc.pqsql.sql |
| Oracle DB | jcr-mjdbc.ora.sql |
| DB2 | jcr-mjdbc.db2.sql |
| MS SQL Server | jcr-mjdbc.mssql.sql |
| Sybase | jcr-mjdbc.sybase.sql |
| HSQLDB | jcr-mjdbc.sql |
In case the non-ANSI node name is used, it's necessary to use a
database with MultiLanguage support[TODO link to MultiLanguage]. Some JDBC
drivers need additional parameters for establishing a Unicode friendly
connection. E.g. under mysql it's necessary to add an additional parameter
for the JDBC driver at the end of JDBC URL. For instance:
jdbc:mysql://exoua.dnsalias.net/portal?characterEncoding=utf8
There are preconfigured configuration files for HSQLDB. Look for these files in /conf/portal and /conf/standalone folders of the jar-file exo.jcr.component.core-XXX.XXX.jar or source-distribution of eXo JCR implementation.
By default, the configuration files are located in service jars
/conf/portal/configuration.xml (eXo services including
JCR Repository Service) and exo-jcr-config.xml
(repositories configuration). In eXo portal product, JCR is configured in
portal web application
portal/WEB-INF/conf/jcr/jcr-configuration.xml (JCR
Repository Service and related serivces) and repository-configuration.xml
(repositories configuration).
Read more about Repository configuration.