|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.utils.db.hibernate.SimpleHibernateConnectionProvider
public class SimpleHibernateConnectionProvider
A simple Hibernate connection provider.
This class wraps a
SimpleConnectionPool
.
Hibernate configuration properties are used to configure the SimpleConnectionPool properties as follows:
The remaining SimpleConnectionPool properties use their default values:
Constructor Summary | |
---|---|
SimpleHibernateConnectionProvider()
|
Method Summary | |
---|---|
void |
addObserver(java.util.Observer o)
Adds an observer. |
void |
close()
Closes down the connection provider. |
void |
closeConnection(java.sql.Connection connection)
Releases a connection back to the pool. |
void |
configure(java.util.Properties properties)
Configures the connection provider. |
java.sql.Connection |
getConnection()
Gets a connection from the pool. |
boolean |
supportsAggressiveRelease()
Indicates if aggressive release is supported. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleHibernateConnectionProvider()
Method Detail |
---|
public void configure(java.util.Properties properties) throws org.hibernate.HibernateException
configure
in interface org.hibernate.connection.ConnectionProvider
properties
- The Hibernate configuration properties.
org.hibernate.HibernateException
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface org.hibernate.connection.ConnectionProvider
java.sql.SQLException
public void closeConnection(java.sql.Connection connection) throws java.sql.SQLException
closeConnection
in interface org.hibernate.connection.ConnectionProvider
connection
- The connection to return to the pool.
java.sql.SQLException
public void close()
close
in interface org.hibernate.connection.ConnectionProvider
public boolean supportsAggressiveRelease()
supportsAggressiveRelease
in interface org.hibernate.connection.ConnectionProvider
public void addObserver(java.util.Observer o)
The observer is notified whenever a bad JDBC connection is detected and whenever it takes more than one attempt to obtain a new connection. See SimpleConnectionPool for more details.
o
- Observer.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |