Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5
    • Tags:
    • Impact type:
      Configuration format change
    • Upgrade notes:
      Hide

      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.

      Show
      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

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: