Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-16318

enable variable escaping in configuration templates

    XMLWordPrintable

    Details

      Description

      Datasources are contributed through a template which resolves the jdb.url variable. We need a way to escape the data directory resolution in the template rendering in favor of the runtime loading.

      nuxeo.defaults
      nuxeo.db.jdbc.url=jdbc:h2:$${nuxeo.data.dir}/${nuxeo.db.name};DB_CLOSE_ON_EXIT=false
      
      datasources-config.xml.nxftl
      ...
          <datasource name="${nuxeo.db.commonds}" driverClassName="${nuxeo.db.driver}"
            maxPoolSize="${nuxeo.db["max-pool-size"]}" minPoolSize="5" blockingTimeoutMillis="10000"
            url="${nuxeo.db.jdbc.url}" validationQuery="${nuxeo.db.validationQuery}"
            username="${nuxeo.db.user}" password="${nuxeo.db.password}"
            accessToUnderlyingConnectionAllowed="true" >
          </datasource>
      ...
      

      Will generate

      datasources-config.xml
          <datasource name="jdbc/nuxeo" driverClassName="org.h2.Driver"
            maxPoolSize="100" minPoolSize="5" blockingTimeoutMillis="10000"
            url="jdbc:h2:${nuxeo.data.dir}/nuxeo;DB_CLOSE_ON_EXIT=false" validationQuery=""
            username="sa" password=""
            accessToUnderlyingConnectionAllowed="true" >
          </datasource>
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: