|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.connection.DatasourceConnectionProvider
org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
public class InjectedDataSourceConnectionProvider
A specialization of DatasourceConnectionProvider which uses the DataSource specified vi
setDataSource(javax.sql.DataSource) rather than locating it from JNDI.
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 Summary | |
|---|---|
InjectedDataSourceConnectionProvider()
|
|
| Method Summary | |
|---|---|
void |
configure(java.util.Properties props)
Initialize the connection provider from given properties. |
java.sql.Connection |
getConnection()
Grab a connection, with the autocommit mode specified by hibernate.connection.autocommit. |
void |
setDataSource(javax.sql.DataSource ds)
|
| Methods inherited from class org.hibernate.connection.DatasourceConnectionProvider |
|---|
close, closeConnection, getDataSource, supportsAggressiveRelease |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InjectedDataSourceConnectionProvider()
| Method Detail |
|---|
public void setDataSource(javax.sql.DataSource ds)
setDataSource in class DatasourceConnectionProvider
public void configure(java.util.Properties props)
throws HibernateException
ConnectionProvider
configure in interface ConnectionProviderconfigure in class DatasourceConnectionProviderprops - SessionFactory properties
HibernateException
public java.sql.Connection getConnection()
throws java.sql.SQLException
ConnectionProvider
getConnection in interface ConnectionProvidergetConnection in class DatasourceConnectionProviderjava.sql.SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||