Class DataSourceDescriptor

java.lang.Object
org.nuxeo.runtime.datasource.DataSourceDescriptor

public class DataSourceDescriptor extends Object
The descriptor for a Nuxeo-defined datasource.

The attributes of a <datasource> element are:

  • name: the JNDI name (for instance jdbc/foo)
  • driverClassName: the JDBC driver class name (only for a non-XA datasource)
  • xaDataSource: the XA datasource class name (only for a XA datasource)

To configure the characteristics of the pool:

  • maxActive: the maximum number of active connections
  • minIdle: the minimum number of idle connections
  • maxIdle: the maximum number of idle connections
  • maxWait: the maximum number of milliseconds to wait for a connection to be available, or -1 (the default) to wait indefinitely
  • ... see org.apache.commons.dbcp.BasicDataSource BasicDataSource setters for more

To configure the datasource connections, individual <property> sub-elements are used.

For a non-XA datasource, you must specify at least a url:

   <property name="url">jdbc:h2:foo/bar</property>
   <property name="username">nuxeo</property>
   <property name="password">nuxeo</property>
 
For a XA datasource, see the documentation for your JDBC driver.
  • Field Details

    • name

      protected String name
    • xaDataSource

      protected String xaDataSource
    • dataSource

      protected String dataSource
    • driverClasssName

      protected String driverClasssName
    • element

      public Element element
    • properties

      public Map<String,String> properties
  • Constructor Details

    • DataSourceDescriptor

      public DataSourceDescriptor()
  • Method Details

    • getName

      public String getName()
    • getXaDataSource

      public String getXaDataSource()
    • getDataSource

      public String getDataSource()
    • getDriverClasssName

      public String getDriverClasssName()
    • getAllProperties

      public Map<String,String> getAllProperties()