|
Dashboard Builder Commons 6.0.0.Beta3 | |||||||||
| 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
|
| 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 |
protected void |
setCurrentThreadDataSource(String name,
DataSource ds)
Store a data source as used by the current thread. |
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
| Constructor Detail |
|---|
public DataSourceManager()
| Method Detail |
|---|
@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
Exception
protected DataSource getCurrentThreadDataSource(String name)
throws Exception
Exception
protected void setCurrentThreadDataSource(String name,
DataSource ds)
throws Exception
Exception
protected Map<String,DataSource> getCurrentThreadDataSources()
throws Exception
Exception
|
Dashboard Builder Commons 6.0.0.Beta3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||