org.apache.openejb.config.typed
Class DataSourceBuilder
java.lang.Object
org.apache.openejb.config.sys.AbstractService
org.apache.openejb.config.sys.Resource
org.apache.openejb.config.typed.DataSourceBuilder
- All Implemented Interfaces:
- Service
public class DataSourceBuilder
- extends Resource
| Fields inherited from class org.apache.openejb.config.sys.Resource |
jndi |
| Methods inherited from class org.apache.openejb.config.sys.AbstractService |
getClassName, getConstructor, getFactoryName, getId, getJar, getProvider, getType, setClassName, setConstructor, setFactoryName, setId, setJar, setProvider, setType |
DataSourceBuilder
public DataSourceBuilder()
id
public DataSourceBuilder id(String id)
withServiceId
public DataSourceBuilder withServiceId(String serviceId)
setServiceId
public void setServiceId(String serviceId)
getServiceId
public String getServiceId()
withDefinition
public DataSourceBuilder withDefinition(String definition)
setDefinition
public void setDefinition(String definition)
getDefinition
public String getDefinition()
withJtaManaged
public DataSourceBuilder withJtaManaged(boolean jtaManaged)
setJtaManaged
public void setJtaManaged(boolean jtaManaged)
getJtaManaged
public boolean getJtaManaged()
withJdbcDriver
public DataSourceBuilder withJdbcDriver(String jdbcDriver)
setJdbcDriver
public void setJdbcDriver(String jdbcDriver)
getJdbcDriver
public String getJdbcDriver()
withJdbcUrl
public DataSourceBuilder withJdbcUrl(URI jdbcUrl)
setJdbcUrl
public void setJdbcUrl(URI jdbcUrl)
getJdbcUrl
public URI getJdbcUrl()
withUserName
public DataSourceBuilder withUserName(String userName)
setUserName
public void setUserName(String userName)
getUserName
public String getUserName()
withPassword
public DataSourceBuilder withPassword(String password)
setPassword
public void setPassword(String password)
getPassword
public String getPassword()
withPasswordCipher
public DataSourceBuilder withPasswordCipher(String passwordCipher)
setPasswordCipher
public void setPasswordCipher(String passwordCipher)
getPasswordCipher
public String getPasswordCipher()
withConnectionProperties
public DataSourceBuilder withConnectionProperties(String connectionProperties)
setConnectionProperties
public void setConnectionProperties(String connectionProperties)
getConnectionProperties
public String getConnectionProperties()
withDefaultAutoCommit
public DataSourceBuilder withDefaultAutoCommit(boolean defaultAutoCommit)
setDefaultAutoCommit
public void setDefaultAutoCommit(boolean defaultAutoCommit)
getDefaultAutoCommit
public boolean getDefaultAutoCommit()
withDefaultReadOnly
public DataSourceBuilder withDefaultReadOnly(String defaultReadOnly)
setDefaultReadOnly
public void setDefaultReadOnly(String defaultReadOnly)
getDefaultReadOnly
public String getDefaultReadOnly()
withInitialSize
public DataSourceBuilder withInitialSize(int initialSize)
setInitialSize
public void setInitialSize(int initialSize)
getInitialSize
public int getInitialSize()
withMaxActive
public DataSourceBuilder withMaxActive(int maxActive)
setMaxActive
public void setMaxActive(int maxActive)
getMaxActive
public int getMaxActive()
withMaxIdle
public DataSourceBuilder withMaxIdle(int maxIdle)
setMaxIdle
public void setMaxIdle(int maxIdle)
getMaxIdle
public int getMaxIdle()
withMinIdle
public DataSourceBuilder withMinIdle(int minIdle)
setMinIdle
public void setMinIdle(int minIdle)
getMinIdle
public int getMinIdle()
withMaxWaitTime
public DataSourceBuilder withMaxWaitTime(Duration maxWaitTime)
setMaxWaitTime
public void setMaxWaitTime(Duration maxWaitTime)
getMaxWaitTime
public Duration getMaxWaitTime()
withMaxWaitTime
public DataSourceBuilder withMaxWaitTime(long time,
TimeUnit unit)
setMaxWaitTime
public void setMaxWaitTime(long time,
TimeUnit unit)
withValidationQuery
public DataSourceBuilder withValidationQuery(String validationQuery)
setValidationQuery
public void setValidationQuery(String validationQuery)
getValidationQuery
public String getValidationQuery()
withTestOnBorrow
public DataSourceBuilder withTestOnBorrow(boolean testOnBorrow)
setTestOnBorrow
public void setTestOnBorrow(boolean testOnBorrow)
getTestOnBorrow
public boolean getTestOnBorrow()
withTestOnReturn
public DataSourceBuilder withTestOnReturn(boolean testOnReturn)
setTestOnReturn
public void setTestOnReturn(boolean testOnReturn)
getTestOnReturn
public boolean getTestOnReturn()
withTestWhileIdle
public DataSourceBuilder withTestWhileIdle(boolean testWhileIdle)
setTestWhileIdle
public void setTestWhileIdle(boolean testWhileIdle)
getTestWhileIdle
public boolean getTestWhileIdle()
withTimeBetweenEvictionRuns
public DataSourceBuilder withTimeBetweenEvictionRuns(Duration timeBetweenEvictionRuns)
setTimeBetweenEvictionRuns
public void setTimeBetweenEvictionRuns(Duration timeBetweenEvictionRuns)
getTimeBetweenEvictionRuns
public Duration getTimeBetweenEvictionRuns()
withTimeBetweenEvictionRuns
public DataSourceBuilder withTimeBetweenEvictionRuns(long time,
TimeUnit unit)
setTimeBetweenEvictionRuns
public void setTimeBetweenEvictionRuns(long time,
TimeUnit unit)
withNumTestsPerEvictionRun
public DataSourceBuilder withNumTestsPerEvictionRun(int numTestsPerEvictionRun)
setNumTestsPerEvictionRun
public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun)
getNumTestsPerEvictionRun
public int getNumTestsPerEvictionRun()
withMinEvictableIdleTime
public DataSourceBuilder withMinEvictableIdleTime(Duration minEvictableIdleTime)
setMinEvictableIdleTime
public void setMinEvictableIdleTime(Duration minEvictableIdleTime)
getMinEvictableIdleTime
public Duration getMinEvictableIdleTime()
withMinEvictableIdleTime
public DataSourceBuilder withMinEvictableIdleTime(long time,
TimeUnit unit)
setMinEvictableIdleTime
public void setMinEvictableIdleTime(long time,
TimeUnit unit)
withPoolPreparedStatements
public DataSourceBuilder withPoolPreparedStatements(boolean poolPreparedStatements)
setPoolPreparedStatements
public void setPoolPreparedStatements(boolean poolPreparedStatements)
getPoolPreparedStatements
public boolean getPoolPreparedStatements()
withMaxOpenPreparedStatements
public DataSourceBuilder withMaxOpenPreparedStatements(int maxOpenPreparedStatements)
setMaxOpenPreparedStatements
public void setMaxOpenPreparedStatements(int maxOpenPreparedStatements)
getMaxOpenPreparedStatements
public int getMaxOpenPreparedStatements()
withAccessToUnderlyingConnectionAllowed
public DataSourceBuilder withAccessToUnderlyingConnectionAllowed(boolean accessToUnderlyingConnectionAllowed)
setAccessToUnderlyingConnectionAllowed
public void setAccessToUnderlyingConnectionAllowed(boolean accessToUnderlyingConnectionAllowed)
getAccessToUnderlyingConnectionAllowed
public boolean getAccessToUnderlyingConnectionAllowed()
withIgnoreDefaultValues
public DataSourceBuilder withIgnoreDefaultValues(boolean ignoreDefaultValues)
setIgnoreDefaultValues
public void setIgnoreDefaultValues(boolean ignoreDefaultValues)
getIgnoreDefaultValues
public boolean getIgnoreDefaultValues()
getProperties
public Properties getProperties()
- Description copied from class:
AbstractService
- Gets the value of the properties property.
This accessor method returns a reference to the live Properties Object,
not a snapshot. Therefore any modification you make to the
returned Properties will be present inside the JAXB object.
This is why there is not a
set method for the properties property.
For example, to add a new value, do as follows:
getProperties().setProperty(key, value);
- Specified by:
getProperties in interface Service- Overrides:
getProperties in class AbstractService
Copyright © 1999-2012 The Apache Software Foundation. All Rights Reserved.