Package com.jalios.jcms.db
Class LoggableThrowableTransaction<R>
java.lang.Object
com.jalios.jcms.db.ThrowableTransaction<R>
com.jalios.jcms.db.LoggableThrowableTransaction<R>
- All Implemented Interfaces:
Transaction<R>
-
Field Summary
FieldsFields inherited from class com.jalios.jcms.db.ThrowableTransaction
exception -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(org.hibernate.Session session) Gets called byHibernateUtil.executeTransaction(Transaction)with an active Hibernate Session.org.apache.log4j.LoggerMethods inherited from class com.jalios.jcms.db.ThrowableTransaction
executeTransaction, getException, hasFailed
-
Field Details
-
logger
protected org.apache.log4j.Logger logger
-
-
Constructor Details
-
LoggableThrowableTransaction
public LoggableThrowableTransaction(org.apache.log4j.Logger logger)
-
-
Method Details
-
getLogger
public org.apache.log4j.Logger getLogger() -
execute
Description copied from interface:TransactionGets called byHibernateUtil.executeTransaction(Transaction)with an active Hibernate Session. Does not need to care about activating or closing the Session, or handling transactions.Allows for returning a result object created within this method, i.e. a domain object or a collection of domain objects. A
TransactionExceptioncan be thrown when there is any Exception: It gets propagated to the caller of theHibernateUtil.executeTransaction(Transaction).- Specified by:
executein interfaceTransaction<R>- Overrides:
executein classThrowableTransaction<R>- Parameters:
session- session passed by theHibernateUtil.executeTransaction(Transaction)- Returns:
- a result object returned by the action, or null
-