org.hibernate.jdbc
Class JDBCContext
java.lang.Object
org.hibernate.jdbc.JDBCContext
- All Implemented Interfaces:
- Serializable
- public class JDBCContext
- extends Object
- implements Serializable
Implementation of JDBCContext.
- Author:
- Steve Ebersole
- See Also:
- Serialized Form
JDBCContext
public JDBCContext(JDBCContext.Context owner,
Connection connection,
boolean autoClose)
getFactory
public SessionFactoryImplementor getFactory()
getBatcher
public Batcher getBatcher()
isConnected
public boolean isConnected()
isSerializable
public boolean isSerializable()
release
public Connection release()
connection
public Connection connection()
throws HibernateException
- Throws:
HibernateException
registerCallbackIfNecessary
public boolean registerCallbackIfNecessary()
registerSynchronizationIfPossible
public boolean registerSynchronizationIfPossible()
isTransactionInProgress
public boolean isTransactionInProgress()
disconnect
public Connection disconnect()
throws HibernateException
- Throws:
HibernateException
reconnect
public void reconnect()
throws HibernateException
- Throws:
HibernateException
reconnect
public void reconnect(Connection conn)
throws HibernateException
- Throws:
HibernateException
beginTransaction
public Transaction beginTransaction()
throws HibernateException
- Throws:
HibernateException
beforeTransactionCompletion
public void beforeTransactionCompletion(Transaction tx)
afterTransactionCompletion
public void afterTransactionCompletion(boolean success,
Transaction tx)
afterNontransactionalQuery
public void afterNontransactionalQuery(boolean success)
- Called after executing a query outside the scope of
a Hibernate or JTA transaction
finalize
protected void finalize()
throws Throwable
- Just in case user forgot to commit()/cancel() or close()
- Throws:
Throwable