org.nuxeo.runtime.datasource
Class DataSourceDescriptor
java.lang.Object
org.nuxeo.runtime.datasource.DataSourceDescriptor
public class DataSourceDescriptor
- extends java.lang.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
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:derby: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 Summary |
org.w3c.dom.Element |
element
|
java.lang.String |
name
|
static java.lang.String |
PROP_PREFIX
How we store XA props in the Reference. |
java.util.Map<java.lang.String,java.lang.String> |
properties
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
public java.lang.String name
element
public org.w3c.dom.Element element
properties
public java.util.Map<java.lang.String,java.lang.String> properties
PROP_PREFIX
public static final java.lang.String PROP_PREFIX
- How we store XA props in the Reference.
- See Also:
- Constant Field Values
DataSourceDescriptor
public DataSourceDescriptor()
getReference
public javax.naming.Reference getReference()
Copyright © 2010 Nuxeo SAS. All Rights Reserved.