Platform Explorer / Nuxeo Platform LTS 2019 10.10

Extension point datasources

Documentation

Example contribution:

    <datasource blockingTimeoutMillis="10000"
        driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
        maxPoolSize="20" minPoolSize="5" name="jdbc/foo">
        <property name="url">jdbc:derby:/home/db;create=true
          </property>
        <property name="username">nuxeo</property>
        <property name="password">nuxeo</property>
    </datasource>

Or, for a XA datasource:

    <datasource blockingTimeoutMillis="10000" maxPoolSize="20"
        minPoolSize="5" name="jdbc/foo" xaDataSource="org.apache.derby.jdbc.EmbeddedXADataSource">
        <property name="databaseName">/home/db</property>
        <property name="createDatabase">create</property>
        <property name="user">nuxeo</property>
        <property name="password">nuxeo</property>
    </datasource>

The allowed attributes of a datasource

element are:

  • name the JNDI name (for instance jdbc/foo )
  • driverClassName the JDBC driver class name (only for a non-XA datasource)
  • xaDataSource the XA datasource class name (only for a XA datasource)

To configure the characteristics of the pool:

  • maxPoolSize the maximum number of active connections
  • minPoolSize the minimum number of idle connections
  • blockingTimeoutMillis the maximum number of milliseconds to wait for a connection to be available, or -1 (the default) to wait indefinitely
  • ... see org.apache.commons.dbcp.BasicDataSource setters for more.

To configure the datasource, individual property sub-elements must be used. For a non-XA datasource, url

, username

and password

are commonly used. For a XA datasource, the properties are done according to the JavaBean setters of the datasource, see the documentation for your JDBC driver for more.

Contribution Descriptors

Existing Contributions

Contributions are presented in the same order as the registration order on this extension point. This order is displayed before the contribution name, in brackets.

  • nuxeo-runtime-10.10-HF33-patch-NXP-29565.jar /opt/nuxeo-server-10.10-tomcat/nxserver/config/datasources-config.xml
    <?xml version='1.0' encoding='UTF-8'?>
    <extension point="datasources" target="org.nuxeo.runtime.datasource">
        <datasource accessToUnderlyingConnectionAllowed="true" activeTimeoutMinutes="0" blockingTimeoutMillis="1000" driverClassName="org.h2.Driver" idleTimeoutMinutes="5" maxPoolSize="100" minPoolSize="5" name="jdbc/nuxeo" password="********" sqlExceptionSorter="org.nuxeo.runtime.datasource.DatasourceExceptionSorter" url="jdbc:h2:/opt/nuxeo-server-10.10-tomcat/nxserver/data/h2/nuxeo;DB_CLOSE_ON_EXIT=false" username="sa" validationQuery="">********</datasource>
        <link global="jdbc/nuxeo" name="jdbc/NuxeoDS" type="javax.sql.DataSource"/>
        <link global="jdbc/nuxeo" name="jdbc/nxsqldirectory" type="javax.sql.DataSource"/>
        <link global="jdbc/nuxeo" name="jdbc/nxrelations-default-jena" type="javax.sql.DataSource"/>
        <link global="jdbc/nuxeo" name="jdbc/comment-relations" type="javax.sql.DataSource"/>
        <link global="jdbc/nuxeo" name="jdbc/nxaudit-logs" type="javax.sql.DataSource"/>
        <link global="jdbc/nuxeo" name="jdbc/nxjbpm" type="javax.sql.DataSource"/>
        <link global="jdbc/nuxeo" name="jdbc/placeful_service_ds" type="javax.sql.DataSource"/>
        <link global="jdbc/nuxeo" name="jdbc/nxwebwidgets" type="javax.sql.DataSource"/>
        <link global="jdbc/nuxeo" name="jdbc/nxuidsequencer" type="javax.sql.DataSource"/>
        <link global="jdbc/nuxeo" name="jdbc/keyvaluestore" type="javax.sql.DataSource"/>
        <link global="jdbc/nuxeo" name="jdbc/repository_default" type="javax.sql.DataSource"/>
      </extension>