Package org.apache.ofbiz.service
Class ServiceXaWrapper
java.lang.Object
java.lang.Thread
org.apache.ofbiz.entity.transaction.GenericXaResource
org.apache.ofbiz.service.ServiceXaWrapper
- All Implemented Interfaces:
Runnable
,XAResource
Deprecated.
- Use ServiceSynchronization instead (via LocalDispatcher)
ServiceXaWrapper - XA Resource wrapper for running services on commit() or rollback()
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Deprecated.static final int
Deprecated.static final int
Deprecated.static final int
Deprecated.Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Fields inherited from interface javax.transaction.xa.XAResource
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY
-
Constructor Summary
ModifierConstructorDescriptionprotected
Deprecated.Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.void
enlist()
Deprecated.Enlists this resource in the current transactionDeprecated.Deprecated.Deprecated.Deprecated.int
Deprecated.void
Deprecated.protected final void
runService
(String service, Map<String, ? extends Object> context, boolean persist, int mode, int type) Deprecated.void
setCommitService
(String serviceName, String runAsUser, Map<String, ? extends Object> context, boolean async, boolean persist) Deprecated.Sets the service to run on commit()void
setCommitService
(String serviceName, Map<String, ? extends Object> context) Deprecated.Sets the service to run on commit()void
setCommitService
(String serviceName, Map<String, ? extends Object> context, boolean async, boolean persist) Deprecated.Sets the service to run on commit()void
setRollbackService
(String serviceName, String runAsUser, Map<String, ? extends Object> context, boolean async, boolean persist) Deprecated.Sets the service to run on rollback()void
setRollbackService
(String serviceName, Map<String, ? extends Object> context) Deprecated.Sets the service to run on rollback()void
setRollbackService
(String serviceName, Map<String, ? extends Object> context, boolean async, boolean persist) Deprecated.Sets the service to run on rollback()Methods inherited from class org.apache.ofbiz.entity.transaction.GenericXaResource
end, enlist, forget, getTransaction, getTransactionTimeout, getXid, isActive, isSameRM, recover, run, runOnTimeout, setActive, setTransaction, setTransactionTimeout, setXid, start
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Field Details
-
TYPE_ROLLBACK
public static final int TYPE_ROLLBACKDeprecated.- See Also:
-
TYPE_COMMIT
public static final int TYPE_COMMITDeprecated.- See Also:
-
MODE_ASYNC
public static final int MODE_ASYNCDeprecated.- See Also:
-
MODE_SYNC
public static final int MODE_SYNCDeprecated.- See Also:
-
-
Constructor Details
-
ServiceXaWrapper
protected ServiceXaWrapper()Deprecated. -
ServiceXaWrapper
Deprecated.
-
-
Method Details
-
setCommitService
Deprecated.Sets the service to run on commit()- Parameters:
serviceName
- Name of service to runcontext
- Context to use when running
-
setCommitService
public void setCommitService(String serviceName, Map<String, ? extends Object> context, boolean async, boolean persist) Deprecated.Sets the service to run on commit()- Parameters:
serviceName
- Name of service to runcontext
- Context to use when runningasync
- override default async behavior
-
setCommitService
public void setCommitService(String serviceName, String runAsUser, Map<String, ? extends Object> context, boolean async, boolean persist) Deprecated.Sets the service to run on commit()- Parameters:
serviceName
- Name of service to runrunAsUser
- UserLoginID to run ascontext
- Context to use when runningasync
- override default async behavior
-
getCommitService
Deprecated.- Returns:
- The name of the service to run on commit()
-
getCommitContext
Deprecated.- Returns:
- The context used when running the commit() service
-
setRollbackService
Deprecated.Sets the service to run on rollback()- Parameters:
serviceName
- Name of service to runcontext
- Context to use when running
-
setRollbackService
public void setRollbackService(String serviceName, Map<String, ? extends Object> context, boolean async, boolean persist) Deprecated.Sets the service to run on rollback()- Parameters:
serviceName
- Name of service to runcontext
- Context to use when runningasync
- override default async behavior
-
setRollbackService
public void setRollbackService(String serviceName, String runAsUser, Map<String, ? extends Object> context, boolean async, boolean persist) Deprecated.Sets the service to run on rollback()- Parameters:
serviceName
- Name of service to runrunAsUser
- userLoginId to run the service ascontext
- Context to use when runningasync
- override default async behavior
-
getRollbackService
Deprecated.- Returns:
- The name of the service to run on rollback()
-
getRollbackContext
Deprecated.- Returns:
- The context used when running the rollback() service
-
enlist
Deprecated.Description copied from class:GenericXaResource
Enlists this resource in the current transaction- Overrides:
enlist
in classGenericXaResource
- Throws:
XAException
-
commit
Deprecated.- Specified by:
commit
in interfaceXAResource
- Specified by:
commit
in classGenericXaResource
- Throws:
XAException
- See Also:
-
rollback
Deprecated.- Specified by:
rollback
in interfaceXAResource
- Specified by:
rollback
in classGenericXaResource
- Throws:
XAException
- See Also:
-
prepare
Deprecated.- Specified by:
prepare
in interfaceXAResource
- Overrides:
prepare
in classGenericXaResource
- Throws:
XAException
-
runService
protected final void runService(String service, Map<String, ? extends Object> context, boolean persist, int mode, int type) throws XAExceptionDeprecated.- Throws:
XAException
-