how to have two, three or N datasources
I need get data from another database, how Can I do
Since Nuxeo 5.5, all datasource have effectively been merged into one common datasource. For instance, templates/common/config/default-sql-directories-bundle.xml
is using datasource jdbc/nxsqldirectory
which is bound to the common jdbc/nuxeo
.
The common DS is defined in templates/default/conf/server.xml
:
<!-- Common datasource for all basic nuxeo datasources -->
<Resource name="${nuxeo.db.commonds}" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000" driverClassName="${nuxeo.db.driver}"
url="${nuxeo.db.jdbc.url}" validationQuery="${nuxeo.db.validationQuery}"
username="${nuxeo.db.user}" password="${nuxeo.db.password}" />
With nuxeo.db.commonds=jdbc/nuxeo
(set in templates/default/nuxeo.defaults
).
That common DS is referenced by other datasources in templates/default/conf/Catalina/localhost/nuxeo.xml
.
You can still create custom datasources in a custom nuxeo.xml
and reference them in your XML extension points.
If doing so, you should create a custom template for overriding nuxeo.xml
.
Please read the Setup documentation.