Implementation of this interface should provide at least two constructors:
Properties
- will be used if implementation is used as additional named hibernate providerModifier and Type | Method and Description |
---|---|
void | commitTransaction(org.hibernate.Transaction tx) Commits specified transaction. |
org.hibernate.SessionFactory | get() Returns SessionFactory . |
org.hibernate.Session | getSession() Returns Session for persistence operations. |
org.hibernate.Transaction | getTransaction(org.hibernate.Session session) Returns started transaction. |
void | returnSession(org.hibernate.Session session) Closes Session . |
void | rollbackTransaction(org.hibernate.Transaction tx) Rolls back specified transaction. |
org.hibernate.SessionFactory get()
SessionFactory
.SessionFactory
.org.hibernate.Session getSession() throws org.hibernate.HibernateException
Session
for persistence operations.Session
for persistence operations.org.hibernate.HibernateException
- if unable to acquire Session
.void returnSession(org.hibernate.Session session)
Session
.session
- Session
which should be closed.org.hibernate.Transaction getTransaction(org.hibernate.Session session) throws org.hibernate.HibernateException
session
- Transaction
needed if joining to existing transaction or starting transaction locally.Transaction
Already started transaction for persistence operations.org.hibernate.HibernateException
- if unable to acquire or open transaction.void commitTransaction(org.hibernate.Transaction tx) throws org.hibernate.HibernateException
tx
- Transaction
transaction to be committed.org.hibernate.HibernateException
- occurred while committing transaction.void rollbackTransaction(org.hibernate.Transaction tx)
tx
- Transaction
transaction to be rolled back.