edu.internet2.middleware.grouper.subj
Class GrouperJdbcConnectionProvider.GrouperJdbcConnectionBean

java.lang.Object
  extended by edu.internet2.middleware.grouper.subj.GrouperJdbcConnectionProvider.GrouperJdbcConnectionBean
All Implemented Interfaces:
JdbcConnectionBean
Enclosing class:
GrouperJdbcConnectionProvider

public static class GrouperJdbcConnectionProvider.GrouperJdbcConnectionBean
extends Object
implements JdbcConnectionBean

bean to hold connection


Constructor Summary
GrouperJdbcConnectionProvider.GrouperJdbcConnectionBean(HibernateSession theHibernateSession)
          construct
 
Method Summary
 Connection connection()
          get a connection (dont close this when done, just call "doneWithConnection()"
 void doneWithConnection()
          call this when the connection is done.
 void doneWithConnectionError(Throwable t)
          call this when the connection is done but there was an error, will pass an exception.
 void doneWithConnectionFinally()
          call this when the connection is not needed, in the finally block this might return to pool.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrouperJdbcConnectionProvider.GrouperJdbcConnectionBean

public GrouperJdbcConnectionProvider.GrouperJdbcConnectionBean(HibernateSession theHibernateSession)
construct

Parameters:
theHibernateSession -
Method Detail

connection

public Connection connection()
                      throws SQLException
Description copied from interface: JdbcConnectionBean
get a connection (dont close this when done, just call "doneWithConnection()"

Specified by:
connection in interface JdbcConnectionBean
Returns:
the connection
Throws:
SQLException - if there is a problem
See Also:
JdbcConnectionBean.connection()

doneWithConnection

public void doneWithConnection()
                        throws SQLException
Description copied from interface: JdbcConnectionBean
call this when the connection is done. This will do any cleanup this is a null-safe method.

Specified by:
doneWithConnection in interface JdbcConnectionBean
Throws:
SQLException - if there is a problem
See Also:
JdbcConnectionBean.doneWithConnection()

doneWithConnectionError

public void doneWithConnectionError(Throwable t)
Description copied from interface: JdbcConnectionBean
call this when the connection is done but there was an error, will pass an exception. This should do whatever and rethrow the exception as runtime

Specified by:
doneWithConnectionError in interface JdbcConnectionBean
See Also:
JdbcConnectionBean.doneWithConnectionError(java.lang.Throwable)

doneWithConnectionFinally

public void doneWithConnectionFinally()
Description copied from interface: JdbcConnectionBean
call this when the connection is not needed, in the finally block this might return to pool. In general, this shouldnt throw exceptions since it is done in a finally block, it should only log them

Specified by:
doneWithConnectionFinally in interface JdbcConnectionBean
See Also:
JdbcConnectionBean.doneWithConnectionFinally()