Platform update: The Nuxeo Jira site is anticipated to be decommissioned Saturday, February 1, 2025. After this date, users will no longer be able to access or refer to Jira.Nuxeo.com. 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