Package org.apache.ofbiz.service
Class ServiceSynchronization
java.lang.Object
org.apache.ofbiz.service.ServiceSynchronization
- All Implemented Interfaces:
javax.transaction.Synchronization
This class is used to execute services when a transaction is either
committed or rolled back. It should generally be accessed via
LocalDispatcher's addCommitService and addRollbackService methods
or by using the service ECA event attribute values global-commit,
global-rollback or global-commit-post-run
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterCompletion
(int status) void
protected static ServiceSynchronization
static void
registerCommitService
(DispatchContext dctx, String serviceName, String runAsUser, Map<String, ? extends Object> context, boolean async, boolean persist) static void
registerRollbackService
(DispatchContext dctx, String serviceName, String runAsUser, Map<String, ? extends Object> context, boolean async, boolean persist)
-
Constructor Details
-
ServiceSynchronization
public ServiceSynchronization()
-
-
Method Details
-
registerCommitService
public static void registerCommitService(DispatchContext dctx, String serviceName, String runAsUser, Map<String, ? extends Object> context, boolean async, boolean persist) throws GenericServiceException- Throws:
GenericServiceException
-
registerRollbackService
public static void registerRollbackService(DispatchContext dctx, String serviceName, String runAsUser, Map<String, ? extends Object> context, boolean async, boolean persist) throws GenericServiceException- Throws:
GenericServiceException
-
getInstance
- Throws:
GenericServiceException
-
afterCompletion
public void afterCompletion(int status) - Specified by:
afterCompletion
in interfacejavax.transaction.Synchronization
-
beforeCompletion
public void beforeCompletion()- Specified by:
beforeCompletion
in interfacejavax.transaction.Synchronization
-