|
Dashboard Builder Commons 6.0.0.Beta1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.dashboard.database.DataSourceManager
@ApplicationScoped public class DataSourceManager
Manager used to access the DataSource instances configured in the current installation.
| Field Summary | |
|---|---|
protected static ThreadLocal |
currentThreadDataSources
Set of data sources used by the current thread. |
static String |
DEFAULT_DATASOURCE_NAME
|
protected String[] |
initialClassesToLoad
|
| Constructor Summary | |
|---|---|
DataSourceManager()
|
|
| Method Summary | |
|---|---|
boolean |
checkDriverClassAvailable(String driverClassName)
|
protected DataSource |
getCurrentThreadDataSource(String name)
Retrieve a data sources being used by the current thread. |
protected Map<String,DataSource> |
getCurrentThreadDataSources()
Retrieve the data sources being used by the current thread. |
DataSource |
getDatasource(String name)
Get a datasource given its name |
List<DataSourceEntry> |
getDataSourceEntries()
Get all registered datasource entries |
DataSourceEntry |
getDataSourceEntryByName(String name)
|
List<String> |
getDataSourceNames()
Get all registered datasource names |
String[] |
getInitialClassesToLoad()
|
protected void |
setCurrentThreadDataSource(String name,
DataSource ds)
Store a data source as used by the current thread. |
void |
setInitialClassesToLoad(String[] initialClassesToLoad)
|
void |
start()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_DATASOURCE_NAME
protected static transient ThreadLocal currentThreadDataSources
protected String[] initialClassesToLoad
| Constructor Detail |
|---|
public DataSourceManager()
| Method Detail |
|---|
public String[] getInitialClassesToLoad()
public void setInitialClassesToLoad(String[] initialClassesToLoad)
@PostConstruct
public void start()
throws Exception
Exceptionpublic boolean checkDriverClassAvailable(String driverClassName)
public List<String> getDataSourceNames()
public List<DataSourceEntry> getDataSourceEntries()
public DataSourceEntry getDataSourceEntryByName(String name)
throws Exception
Exception
public DataSource getDatasource(String name)
throws Exception
Exceptionprotected DataSource getCurrentThreadDataSource(String name)
protected void setCurrentThreadDataSource(String name,
DataSource ds)
protected Map<String,DataSource> getCurrentThreadDataSources()
|
Dashboard Builder Commons 6.0.0.Beta1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||