public class JDBCContext extends java.lang.Object implements java.io.Serializable, ConnectionManager.Callback
| Modifier and Type | Class and Description |
|---|---|
static interface |
JDBCContext.Context |
| Constructor and Description |
|---|
JDBCContext(JDBCContext.Context owner,
java.sql.Connection connection,
Interceptor interceptor) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterNontransactionalQuery(boolean success)
Called after executing a query outside the scope of
a Hibernate or JTA transaction
|
void |
afterTransactionBegin(Transaction tx)
We cannot rely upon this method being called! It is only
called if we are using Hibernate Transaction API.
|
void |
afterTransactionCompletion(boolean success,
Transaction tx) |
void |
beforeTransactionCompletion(Transaction tx) |
java.sql.Connection |
borrowConnection() |
void |
cleanUpJtaSynchronizationCallbackCoordinator() |
java.sql.Connection |
connection() |
void |
connectionCleanedUp() |
void |
connectionOpened() |
static JDBCContext |
deserialize(java.io.ObjectInputStream ois,
JDBCContext.Context context,
Interceptor interceptor)
Custom deserialization routine used during deserialization of a
Session/PersistenceContext for increased performance.
|
ConnectionManager |
getConnectionManager() |
SessionFactoryImplementor |
getFactory() |
CallbackCoordinator |
getJtaSynchronizationCallbackCoordinator() |
CallbackCoordinator |
getJtaSynchronizationCallbackCoordinator(javax.transaction.Transaction jtaTransaction) |
Transaction |
getTransaction() |
boolean |
isTransactionInProgress() |
boolean |
registerCallbackIfNecessary() |
boolean |
registerSynchronizationIfPossible() |
void |
serialize(java.io.ObjectOutputStream oos)
Custom serialization routine used during serialization of a
Session/PersistenceContext for increased performance.
|
public JDBCContext(JDBCContext.Context owner, java.sql.Connection connection, Interceptor interceptor)
public CallbackCoordinator getJtaSynchronizationCallbackCoordinator()
public CallbackCoordinator getJtaSynchronizationCallbackCoordinator(javax.transaction.Transaction jtaTransaction)
public void cleanUpJtaSynchronizationCallbackCoordinator()
public void connectionOpened()
connectionOpened in interface ConnectionManager.Callbackpublic void connectionCleanedUp()
connectionCleanedUp in interface ConnectionManager.Callbackpublic SessionFactoryImplementor getFactory()
public ConnectionManager getConnectionManager()
public java.sql.Connection borrowConnection()
public java.sql.Connection connection()
throws HibernateException
HibernateExceptionpublic boolean registerCallbackIfNecessary()
public boolean registerSynchronizationIfPossible()
public boolean isTransactionInProgress()
isTransactionInProgress in interface ConnectionManager.Callbackpublic Transaction getTransaction() throws HibernateException
HibernateExceptionpublic void beforeTransactionCompletion(Transaction tx)
public void afterTransactionBegin(Transaction tx)
public void afterTransactionCompletion(boolean success,
Transaction tx)
public void afterNontransactionalQuery(boolean success)
public void serialize(java.io.ObjectOutputStream oos)
throws java.io.IOException
oos - The stream to which we should write the serial data.java.io.IOExceptionpublic static JDBCContext deserialize(java.io.ObjectInputStream ois, JDBCContext.Context context, Interceptor interceptor) throws java.io.IOException
ois - The stream from which to read the entry.java.io.IOExceptionCopyright © 2013. All Rights Reserved.