public class DatabaseUtil extends Object implements DataSourceProviderInterface
DataSourceProviderInterface.DatasourceType
Constructor and Description |
---|
DatabaseUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
closeSilently(Connection conn) |
static void |
closeSilently(Connection[] connections) |
static void |
closeSilently(Statement st) |
static void |
closeSilently(Statement[] statements) |
DataSource |
getNamedDataSource(String datasourceName)
Implementation of DatasourceProviderInterface.
|
DataSource |
getNamedDataSource(String datasourceName,
DataSourceProviderInterface.DatasourceType type)
Returns the named data source of respecting its
type |
public static void closeSilently(Connection[] connections)
public static void closeSilently(Connection conn)
public static void closeSilently(Statement[] statements)
public static void closeSilently(Statement st)
public DataSource getNamedDataSource(String datasourceName) throws DataSourceNamingException
getNamedDataSource
in interface DataSourceProviderInterface
DataSourceNamingException
public DataSource getNamedDataSource(String datasourceName, DataSourceProviderInterface.DatasourceType type) throws DataSourceNamingException
DataSourceProviderInterface
type
getNamedDataSource
in interface DataSourceProviderInterface
datasourceName
- name of the desired data sourcetype
- data source's typeDataSourceNamingException