Platform migration updates: Starting October 25th, 2024, all support issues must be submitted through Hyland Community. The Nuxeo Jira site will enter indefinite read-only mode at 5 p.m. EDT. Cloud deployment services will be temporarily offline, with normal operations resuming Monday, October 28. Read the Hyland Connect blog post for more details.
To define a Tomcat XA datasource, you can use in the Context file (nuxeo.xml) a Resource with a Nuxeo-specific factory, the proper xaDataSource, and whatever datasource-specific configuration parameters are needed:
To define a Tomcat XA datasource, you can use in the Context file (nuxeo.xml) a Resource with a Nuxeo-specific factory, the proper xaDataSource, and whatever datasource-specific configuration parameters are needed:
For Derby:
<Resource name="jdbc/nxsqldirectory" auth="Container"
type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000"
factory="org.nuxeo.runtime.datasource.DataSourceFactory"
xaDataSource="org.apache.derby.jdbc.EmbeddedXADataSource"
DatabaseName="${nuxeo.data.dir}/derby/${nuxeo.db.name}"
CreateDatabase="create"
User="${nuxeo.db.user}"
Password="${nuxeo.db.password}"
/>
For Oracle:
<Resource name="jdbc/nxsqldirectory" auth="Container"
type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000"
factory="org.nuxeo.runtime.datasource.DataSourceFactory"
xaDataSource="oracle.jdbc.xa.client.OracleXADataSource"
URL="jdbc:oracle:thin:@${nuxeo.db.host}:${nuxeo.db.port}:${nuxeo.db.name}"
User="${nuxeo.db.user}"
Password="${nuxeo.db.password}"
/>
For PostgreSQL:
<Resource name="jdbc/nxsqldirectory" auth="Container"
type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000"
factory="org.nuxeo.runtime.datasource.DataSourceFactory"
xaDataSource="org.postgresql.xa.PGXADataSource"
ServerName="${nuxeo.db.host}"
PortNumber="${nuxeo.db.port}"
DatabaseName="${nuxeo.db.name}"
User="${nuxeo.db.user}"
Password="${nuxeo.db.password}"
/>
Note that you can also use the extension-point-based configuration as described in NXP-4419 .
Description
Make it possible to declare XA datasource for Tomcat.
Attachments
Issue Links
depends on
NXP-4419Allow use of datasources when no container is available
Resolved
NXP-7729Create all needed SQL directories at startup time