Class ServiceEngineTestServices

java.lang.Object
org.apache.ofbiz.service.test.ServiceEngineTestServices

public class ServiceEngineTestServices extends Object
  • Constructor Details

    • ServiceEngineTestServices

      public ServiceEngineTestServices()
  • Method Details

    • testServiceDeadLockRetry

      public static Map<String,Object> testServiceDeadLockRetry(DispatchContext dctx, Map<String,? extends Object> context)
    • testServiceDeadLockRetryThreadA

      public static Map<String,Object> testServiceDeadLockRetryThreadA(DispatchContext dctx, Map<String,? extends Object> context)
    • testServiceDeadLockRetryThreadB

      public static Map<String,Object> testServiceDeadLockRetryThreadB(DispatchContext dctx, Map<String,? extends Object> context)
    • testServiceLockWaitTimeoutRetry

      public static Map<String,Object> testServiceLockWaitTimeoutRetry(DispatchContext dctx, Map<String,? extends Object> context)
    • testServiceLockWaitTimeoutRetryGrabber

      public static Map<String,Object> testServiceLockWaitTimeoutRetryGrabber(DispatchContext dctx, Map<String,? extends Object> context)
    • testServiceLockWaitTimeoutRetryWaiter

      public static Map<String,Object> testServiceLockWaitTimeoutRetryWaiter(DispatchContext dctx, Map<String,? extends Object> context)
    • testServiceLockWaitTimeoutRetryCantRecover

      public static Map<String,Object> testServiceLockWaitTimeoutRetryCantRecover(DispatchContext dctx, Map<String,? extends Object> context)
      NOTE that this is a funny case where the auto-retry in the service engine for the call to testServiceLockWaitTimeoutRetryCantRecoverWaiter would NOT be able to recover because it would try again given the new transaction and all, but the lock for the waiting thread would still be there... so it will fail repeatedly.

      TODO: there's got to be some way to do this, but how?!? :(

      NOTE: maybe this will work: create a list that the service engine maintains of services it will run after the current service run is complete, and AFTER it has committed or rolled back its transaction; if a service finds it has a lock wait timeout, add itself to the list for its parent service (somehow...) and off we go!

      Parameters:
      dctx - the dispatch context
      context - the context
      Returns:
      returns the results of the service execution
    • testServiceLockWaitTimeoutRetryCantRecoverWaiter

      public static Map<String,Object> testServiceLockWaitTimeoutRetryCantRecoverWaiter(DispatchContext dctx, Map<String,? extends Object> context)
    • testServiceOwnTxSubServiceAfterSetRollbackOnlyInParentErrorCatchWrapper

      public static Map<String,Object> testServiceOwnTxSubServiceAfterSetRollbackOnlyInParentErrorCatchWrapper(DispatchContext dctx, Map<String,? extends Object> context)
    • testServiceOwnTxSubServiceAfterSetRollbackOnlyInParent

      public static Map<String,Object> testServiceOwnTxSubServiceAfterSetRollbackOnlyInParent(DispatchContext dctx, Map<String,? extends Object> context)
    • testServiceOwnTxSubServiceAfterSetRollbackOnlyInParentSubService

      public static Map<String,Object> testServiceOwnTxSubServiceAfterSetRollbackOnlyInParentSubService(DispatchContext dctx, Map<String,? extends Object> context)
    • testServiceEcaGlobalEventExec

      public static Map<String,Object> testServiceEcaGlobalEventExec(DispatchContext dctx, Map<String,? extends Object> context)
    • testServiceEcaGlobalEventExecOnCommit

      public static Map<String,Object> testServiceEcaGlobalEventExecOnCommit(DispatchContext dctx, Map<String,? extends Object> context)
    • testServiceEcaGlobalEventExecToRollback

      public static Map<String,Object> testServiceEcaGlobalEventExecToRollback(DispatchContext dctx, Map<String,? extends Object> context)
    • testServiceEcaGlobalEventExecOnRollback

      public static Map<String,Object> testServiceEcaGlobalEventExecOnRollback(DispatchContext dctx, Map<String,? extends Object> context)