public abstract class Transactional extends WebMotionFilter
| Modifier and Type | Field and Description |
|---|---|
static String |
CURRENT_ENTITY_MANAGER
Attribute name stores the EntityManager
|
static String |
CURRENT_ENTITY_TRANSACTION
Attribute name stores the EntityTransaction
|
static String |
CURRENT_GENERIC_DAO
Attribute name stores the GenericDAO
|
static String |
DEFAULT_PERSISTENCE_UNIT_NAME
Default persistence unit name
|
protected Map<String,javax.persistence.EntityManagerFactory> |
factories
Cache all EntityManagerFactory
|
contextable| Constructor and Description |
|---|
Transactional()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
tx(javax.servlet.http.HttpServletRequest request,
String persistenceUnitName,
Properties properties,
String packageEntityName,
String entityName)
Create the transaction and the GenericDAO if the entity name is not
empty or null.
|
doChain, doProcess, doProcess, getAction, getParametersgetContext, renderAction, renderContent, renderContent, renderDownload, renderDownload, renderError, renderError, renderFailure, renderForward, renderForward, renderJSON, renderJSONP, renderLastPage, renderRedirect, renderStatus, renderStream, renderStream, renderStringTemplate, renderSuccess, renderTemplate, renderURL, renderView, renderXML, setContextable, toMappublic static String DEFAULT_PERSISTENCE_UNIT_NAME
public static String CURRENT_ENTITY_MANAGER
public static String CURRENT_ENTITY_TRANSACTION
public static String CURRENT_GENERIC_DAO
public void tx(javax.servlet.http.HttpServletRequest request,
String persistenceUnitName,
Properties properties,
String packageEntityName,
String entityName)
throws Exception
request - set EntityManager, EntityTransaction and GenericDAO into the requestpersistenceUnitName - precise the persistence unitpackageEntityName - precise the package of entityentityName - precise the class name of the entityException - catch execption to rollback the transactionCopyright © 2011–2014 Debux. All rights reserved.