1.18. JDBC Data Container Config

The following topics are covered:

1.18.1. General recommendations for database configuration
1.18.2. Multi-database Configuration
1.18.3. Single-database configuration
1.18.4. Simple and Complex queries
1.18.5. Forse Query Hints
1.18.6. Notes for Microsoft Windows users

eXo JCR persistent data container can work in two configuration modes:

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:

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.

Copyright ©2012. All rights reserved. eXo Platform SAS