Used internally by HibernateTransactionManager.
Can also be used directly in application code.
HibernateExceptionTranslator, HibernateTransactionManager
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final Log | |
| public static final int | SESSION_SYNCHRONIZATION_ORDER
Order value for TransactionSynchronization objects that clean up Hibernate Sessions. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static void | closeSession(Session
the Hibernate Session to close (may be session)null)
References Deprecated
Session is deprecated or references (maybe indirectly) at least one deprecated element.
Perform actual closing of the Hibernate Session, catching and logging any cleanup exceptions thrown. |
| public static DataAccessException | Returns: the corresponding DataAccessException instancethe HibernateException that occurred ex)Convert the given HibernateException to an appropriate exception
from the |
| pack-priv static void | flush(Session
the Hibernate Session to flush session, boolean whether this flush is triggered by transaction synchronization synch)
References Deprecated
Session is deprecated or references (maybe indirectly) at least one deprecated element.
Trigger a flush on the given Hibernate Session, converting regular
|
| public static DataSource | Returns: the DataSource, ornull if none foundthe SessionFactory to check sessionFactory)
References Deprecated
SessionFactory is deprecated or references (maybe indirectly) at least one deprecated element.
Determine the DataSource of the given SessionFactory. |
| logger | back to summary |
|---|---|
| pack-priv static final Log logger | |
| SESSION_SYNCHRONIZATION_ORDER | back to summary |
|---|---|
| public static final int SESSION_SYNCHRONIZATION_ORDER Order value for TransactionSynchronization objects that clean up Hibernate Sessions.
Returns | |
| SessionFactoryUtils | back to summary |
|---|---|
| public SessionFactoryUtils() | |
| closeSession | back to summary |
|---|---|
| public static void closeSession(Session session)
References Deprecated
See corresponding docs for further information. Perform actual closing of the Hibernate Session, catching and logging any cleanup exceptions thrown.
| |
| convertHibernateAccessException | back to summary |
|---|---|
| public static DataAccessException convertHibernateAccessException(HibernateException ex) Convert the given HibernateException to an appropriate exception
from the
| |
| flush | back to summary |
|---|---|
| pack-priv static void flush(Session session, boolean synch) throws DataAccessException
References Deprecated
See corresponding docs for further information. Trigger a flush on the given Hibernate Session, converting regular
| |
| getDataSource | back to summary |
|---|---|
| public static DataSource getDataSource(SessionFactory sessionFactory)
References Deprecated
See corresponding docs for further information. Determine the DataSource of the given SessionFactory.
| |