@Service(value=DataSourcePoolProvider.class) @Property(name="service.description",value="Day Commons Data Source Pool implementation") @Property(name="service.vendor",value="Day Management AG") public class JdbcPoolService extends java.lang.Object implements DataSourcePoolProvider
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_WAIT_MSEC
Default time to wait for an available connection, in msec
|
static int |
DEFAULT_POOL_SIZE
Default size of our pools
|
static int |
MAX_WAIT_BLOCK
If DataSourceConfig.maxWaitMsec has this value, block forever on empty pool
|
static int |
MAX_WAIT_DONT_WAIT
If DataSourceConfig.maxWaitMsec has this value, fail immediately on empty pool
|
static java.lang.String |
OSGI_PROPERTY_DATASOURCE_NAME |
static java.lang.String |
OSGI_PROPERTY_DATASOURCE_SVC_PROPS |
static java.lang.String |
OSGI_PROPERTY_DEFAULT_AUTO_COMMIT |
static java.lang.String |
OSGI_PROPERTY_DEFAULT_READ_ONLY |
static java.lang.String |
OSGI_PROPERTY_JDBC_CONNECTION_URI |
static java.lang.String |
OSGI_PROPERTY_JDBC_DRIVER_CLASS |
static java.lang.String |
OSGI_PROPERTY_JDBC_PASSWORD |
static java.lang.String |
OSGI_PROPERTY_JDBC_USERNAME |
static java.lang.String |
OSGI_PROPERTY_JDBC_VALIDATION_QUERY |
static java.lang.String |
OSGI_PROPERTY_MAX_WAIT_MSEC |
static java.lang.String |
OSGI_PROPERTY_POOL_SIZE |
Constructor and Description |
---|
JdbcPoolService() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getDataSource(java.lang.String name)
Return the named data source, if available
|
java.lang.String[] |
getNames()
Returns the names of data sources
|
public static final int DEFAULT_POOL_SIZE
public static final int DEFAULT_MAX_WAIT_MSEC
public static final int MAX_WAIT_DONT_WAIT
public static final int MAX_WAIT_BLOCK
@Property(value="com.somevendor.somedriver.Driver") public static final java.lang.String OSGI_PROPERTY_JDBC_DRIVER_CLASS
@Property(value="jdbc:somedriver:someDB;param=value") public static final java.lang.String OSGI_PROPERTY_JDBC_CONNECTION_URI
@Property(value="") public static final java.lang.String OSGI_PROPERTY_JDBC_USERNAME
@Property(value="") public static final java.lang.String OSGI_PROPERTY_JDBC_PASSWORD
@Property(value="") public static final java.lang.String OSGI_PROPERTY_JDBC_VALIDATION_QUERY
@Property(boolValue=false) public static final java.lang.String OSGI_PROPERTY_DEFAULT_READ_ONLY
@Property(boolValue=true) public static final java.lang.String OSGI_PROPERTY_DEFAULT_AUTO_COMMIT
@Property(longValue=10L) public static final java.lang.String OSGI_PROPERTY_POOL_SIZE
@Property(longValue=1000L) public static final java.lang.String OSGI_PROPERTY_MAX_WAIT_MSEC
@Property(value="") public static final java.lang.String OSGI_PROPERTY_DATASOURCE_NAME
@Property(value={}, cardinality=1024) public static final java.lang.String OSGI_PROPERTY_DATASOURCE_SVC_PROPS
public java.lang.Object getDataSource(java.lang.String name)
DataSourcePoolProvider
getDataSource
in interface DataSourcePoolProvider
name
- Configured name of the data sourcepublic java.lang.String[] getNames()
DataSourcePoolProvider
getNames
in interface DataSourcePoolProvider
Copyright © 2010 - 2020 Adobe. All Rights Reserved