@EachProperty(value="datasources", primary="default") @Context public class DatasourceConfiguration extends java.lang.Object implements BasicJdbcConfiguration
PoolDataSourceImpl
are available to be configured.
If the url, driver class, username, or password are missing, sensible defaults
will be provided when possible. If no configuration beyond the datasource name
is provided, an in memory datasource will be configured based on the available
drivers on the classpath.PREFIX
Constructor and Description |
---|
DatasourceConfiguration(java.lang.String name)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getConfiguredDriverClassName() |
java.lang.String |
getConfiguredPassword() |
java.lang.String |
getConfiguredUrl() |
java.lang.String |
getConfiguredUsername() |
java.lang.String |
getConfiguredValidationQuery() |
java.lang.String |
getDriverClassName() |
java.lang.String |
getName() |
java.lang.String |
getPassword() |
java.lang.String |
getUrl() |
java.lang.String |
getUsername() |
java.lang.String |
getValidationQuery() |
void |
setDataSourceProperties(java.util.Map<java.lang.String,?> dsProperties)
Sets the datasource properties.
|
void |
setDriverClassName(java.lang.String driverClassName) |
void |
setName(java.lang.String name) |
void |
setPassword(java.lang.String password) |
void |
setUrl(java.lang.String url) |
void |
setUsername(java.lang.String username) |
public DatasourceConfiguration(@Parameter java.lang.String name) throws java.sql.SQLException
name
- name that comes from propertiesjava.sql.SQLException
public java.lang.String getName()
getName
in interface BasicJdbcConfiguration
public void setName(java.lang.String name) throws java.sql.SQLException
name
- the name of the datasourcejava.sql.SQLException
- an sql exceptionpublic java.lang.String getDriverClassName()
getDriverClassName
in interface BasicJdbcConfiguration
public void setDriverClassName(java.lang.String driverClassName)
setDriverClassName
in interface BasicJdbcConfiguration
driverClassName
- Sets the driver class namepublic java.lang.String getConfiguredDriverClassName()
getConfiguredDriverClassName
in interface BasicJdbcConfiguration
public java.lang.String getConfiguredUrl()
getConfiguredUrl
in interface BasicJdbcConfiguration
public java.lang.String getUrl()
getUrl
in interface BasicJdbcConfiguration
public void setUrl(java.lang.String url)
setUrl
in interface BasicJdbcConfiguration
url
- Sets the urlpublic java.lang.String getUsername()
getUsername
in interface BasicJdbcConfiguration
public void setUsername(java.lang.String username)
setUsername
in interface BasicJdbcConfiguration
username
- the usernamepublic java.lang.String getConfiguredUsername()
getConfiguredUsername
in interface BasicJdbcConfiguration
public java.lang.String getPassword()
getPassword
in interface BasicJdbcConfiguration
public void setPassword(java.lang.String password)
setPassword
in interface BasicJdbcConfiguration
password
- Sets the passwordpublic java.lang.String getConfiguredPassword()
getConfiguredPassword
in interface BasicJdbcConfiguration
public java.lang.String getValidationQuery()
getValidationQuery
in interface BasicJdbcConfiguration
public void setDataSourceProperties(java.util.Map<java.lang.String,?> dsProperties)
BasicJdbcConfiguration
setDataSourceProperties
in interface BasicJdbcConfiguration
dsProperties
- The propertiespublic java.lang.String getConfiguredValidationQuery()
getConfiguredValidationQuery
in interface BasicJdbcConfiguration