Class ServiceSynchronization

  • All Implemented Interfaces:
    javax.transaction.Synchronization

    public class ServiceSynchronization
    extends java.lang.Object
    implements 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
    • Field Detail

      • module

        public static final java.lang.String module
    • Constructor Detail

      • ServiceSynchronization

        public ServiceSynchronization()
    • Method Detail

      • registerCommitService

        public static void registerCommitService​(DispatchContext dctx,
                                                 java.lang.String serviceName,
                                                 java.lang.String runAsUser,
                                                 java.util.Map<java.lang.String,​? extends java.lang.Object> context,
                                                 boolean async,
                                                 boolean persist)
                                          throws GenericServiceException
        Throws:
        GenericServiceException
      • registerRollbackService

        public static void registerRollbackService​(DispatchContext dctx,
                                                   java.lang.String serviceName,
                                                   java.lang.String runAsUser,
                                                   java.util.Map<java.lang.String,​? extends java.lang.Object> context,
                                                   boolean async,
                                                   boolean persist)
                                            throws GenericServiceException
        Throws:
        GenericServiceException
      • afterCompletion

        public void afterCompletion​(int status)
        Specified by:
        afterCompletion in interface javax.transaction.Synchronization
      • beforeCompletion

        public void beforeCompletion()
        Specified by:
        beforeCompletion in interface javax.transaction.Synchronization