Package org.nuxeo.runtime.datasource
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. - name: the JNDI name (for instance
-
-
Field Summary
Fields Modifier and Type Field Description protected String
dataSource
protected String
driverClasssName
Element
element
protected String
name
Map<String,String>
properties
protected String
xaDataSource
-
Constructor Summary
Constructors Constructor Description DataSourceDescriptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
getAllProperties()
String
getDataSource()
String
getDriverClasssName()
String
getName()
String
getXaDataSource()
-