public static class DataSourceBean.DataSourceMDConfigBean extends MDPoolConfigBean<DataSource,DataSourceBean.DataSourceMDConfigBean> implements UnregisterAware
Constructor and Description |
---|
DataSourceMDConfigBean() |
Modifier and Type | Method and Description |
---|---|
void |
beforeUnregister()
Method called before bean unregister.
|
protected Class<? extends DataSource> |
getRepositoryIfc()
Get interface to which all instances in this pool must conform.
|
protected String |
getRepositoryPoolClassName()
Finds and retrieves repository pool class name for data source defined in this config bean. *
Name of a pool class will be retrieved from poolCls field or looked for instances of
DataSourcePool class annotated with Repository.Meta which supported uri
matches (regexp) of data source URI. |
void |
initialize()
Method will be called, when bean will be created, configured and ready to use.
|
protected void |
initRepository(DataSource repo)
Initializes instances of provided data source.
|
void |
setWatchdogFrequency(Duration watchdogFrequency) |
beanConfigurationChanged, getRepository, getRepositoryClassName, getUri, register, setInstances, setMdPool, setRepository, unloadOldBeans, unregister
public void setWatchdogFrequency(Duration watchdogFrequency)
public void initialize()
Initializable
initialize
in interface Initializable
initialize
in class MDPoolConfigBean<DataSource,DataSourceBean.DataSourceMDConfigBean>
public void beforeUnregister()
UnregisterAware
beforeUnregister
in interface UnregisterAware
protected Class<? extends DataSource> getRepositoryIfc()
getRepositoryIfc
in class MDPoolConfigBean<DataSource,DataSourceBean.DataSourceMDConfigBean>
protected String getRepositoryPoolClassName() throws DBInitException
poolCls
field or looked for instances of
DataSourcePool
class annotated with Repository.Meta
which supported uri
matches (regexp) of data source URI.getRepositoryPoolClassName
in class MDPoolConfigBean<DataSource,DataSourceBean.DataSourceMDConfigBean>
DBInitException
protected void initRepository(DataSource repo) throws RepositoryException
initRepository
in class MDPoolConfigBean<DataSource,DataSourceBean.DataSourceMDConfigBean>
repo
- instance of data sourceRepositoryException
Copyright © 2004–2021 "Tigase, Inc.". All rights reserved.