public class InjectedDataSourceConnectionProvider extends DatasourceConnectionProviderImpl
DatasourceConnectionProviderImpl
which uses the DataSource
specified vi
setDataSource(javax.sql.DataSource)
rather than locating it from JNDI.
NOTE : setDataSource(javax.sql.DataSource)
must be called prior to configure(java.util.Properties)
.
TODO : could not find where #setDataSource is actually called. Can't this just be passed in to #configure???Constructor and Description |
---|
InjectedDataSourceConnectionProvider() |
Modifier and Type | Method and Description |
---|---|
void |
configure(Properties props) |
Connection |
getConnection()
Obtains a connection for Hibernate use according to the underlying strategy of this provider.
|
void |
setDataSource(DataSource ds) |
closeConnection, configure, getDataSource, isUnwrappableAs, setJndiService, stop, supportsAggressiveRelease, unwrap
public InjectedDataSourceConnectionProvider()
public void setDataSource(DataSource ds)
setDataSource
in class DatasourceConnectionProviderImpl
public void configure(Properties props) throws HibernateException
HibernateException
public Connection getConnection() throws SQLException
DatasourceConnectionProviderImpl
getConnection
in interface ConnectionProvider
getConnection
in class DatasourceConnectionProviderImpl
SQLException
- Indicates a problem opening a connectionCopyright © 2018 JBoss by Red Hat. All rights reserved.