Class ServiceXaWrapper

  • All Implemented Interfaces:
    java.lang.Runnable, javax.transaction.xa.XAResource

    @Deprecated
    public class ServiceXaWrapper
    extends GenericXaResource
    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

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int MODE_ASYNC
      Deprecated.
       
      static int MODE_SYNC
      Deprecated.
       
      static int TYPE_COMMIT
      Deprecated.
       
      static int TYPE_ROLLBACK
      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
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void commit​(javax.transaction.xa.Xid xid, boolean onePhase)
      Deprecated.
       
      void enlist()
      Deprecated.
      Enlists this resource in the current transaction
      java.util.Map<java.lang.String,​? extends java.lang.Object> getCommitContext()
      Deprecated.
       
      java.lang.String getCommitService()
      Deprecated.
       
      java.util.Map<java.lang.String,​? extends java.lang.Object> getRollbackContext()
      Deprecated.
       
      java.lang.String getRollbackService()
      Deprecated.
       
      int prepare​(javax.transaction.xa.Xid xid)
      Deprecated.
       
      void rollback​(javax.transaction.xa.Xid xid)
      Deprecated.
       
      protected void runService​(java.lang.String service, java.util.Map<java.lang.String,​? extends java.lang.Object> context, boolean persist, int mode, int type)
      Deprecated.
       
      void setCommitService​(java.lang.String serviceName, java.lang.String runAsUser, java.util.Map<java.lang.String,​? extends java.lang.Object> context, boolean async, boolean persist)
      Deprecated.
      Sets the service to run on commit()
      void setCommitService​(java.lang.String serviceName, java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      Deprecated.
      Sets the service to run on commit()
      void setCommitService​(java.lang.String serviceName, java.util.Map<java.lang.String,​? extends java.lang.Object> context, boolean async, boolean persist)
      Deprecated.
      Sets the service to run on commit()
      void setRollbackService​(java.lang.String serviceName, java.lang.String runAsUser, java.util.Map<java.lang.String,​? extends java.lang.Object> context, boolean async, boolean persist)
      Deprecated.
      Sets the service to run on rollback()
      void setRollbackService​(java.lang.String serviceName, java.util.Map<java.lang.String,​? extends java.lang.Object> context)
      Deprecated.
      Sets the service to run on rollback()
      void setRollbackService​(java.lang.String serviceName, java.util.Map<java.lang.String,​? extends java.lang.Object> context, boolean async, boolean persist)
      Deprecated.
      Sets the service to run on rollback()
      • 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
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ServiceXaWrapper

        protected ServiceXaWrapper()
        Deprecated.
      • ServiceXaWrapper

        public ServiceXaWrapper​(DispatchContext dctx)
        Deprecated.
    • Method Detail

      • setCommitService

        public void setCommitService​(java.lang.String serviceName,
                                     java.util.Map<java.lang.String,​? extends java.lang.Object> context)
        Deprecated.
        Sets the service to run on commit()
        Parameters:
        serviceName - Name of service to run
        context - Context to use when running
      • setCommitService

        public void setCommitService​(java.lang.String serviceName,
                                     java.util.Map<java.lang.String,​? extends java.lang.Object> context,
                                     boolean async,
                                     boolean persist)
        Deprecated.
        Sets the service to run on commit()
        Parameters:
        serviceName - Name of service to run
        context - Context to use when running
        async - override default async behavior
      • setCommitService

        public void setCommitService​(java.lang.String serviceName,
                                     java.lang.String runAsUser,
                                     java.util.Map<java.lang.String,​? extends java.lang.Object> context,
                                     boolean async,
                                     boolean persist)
        Deprecated.
        Sets the service to run on commit()
        Parameters:
        serviceName - Name of service to run
        runAsUser - UserLoginID to run as
        context - Context to use when running
        async - override default async behavior
      • getCommitService

        public java.lang.String getCommitService()
        Deprecated.
        Returns:
        The name of the service to run on commit()
      • getCommitContext

        public java.util.Map<java.lang.String,​? extends java.lang.Object> getCommitContext()
        Deprecated.
        Returns:
        The context used when running the commit() service
      • setRollbackService

        public void setRollbackService​(java.lang.String serviceName,
                                       java.util.Map<java.lang.String,​? extends java.lang.Object> context)
        Deprecated.
        Sets the service to run on rollback()
        Parameters:
        serviceName - Name of service to run
        context - Context to use when running
      • setRollbackService

        public void setRollbackService​(java.lang.String serviceName,
                                       java.util.Map<java.lang.String,​? extends java.lang.Object> context,
                                       boolean async,
                                       boolean persist)
        Deprecated.
        Sets the service to run on rollback()
        Parameters:
        serviceName - Name of service to run
        context - Context to use when running
        async - override default async behavior
      • setRollbackService

        public void setRollbackService​(java.lang.String serviceName,
                                       java.lang.String runAsUser,
                                       java.util.Map<java.lang.String,​? extends java.lang.Object> context,
                                       boolean async,
                                       boolean persist)
        Deprecated.
        Sets the service to run on rollback()
        Parameters:
        serviceName - Name of service to run
        runAsUser - userLoginId to run the service as
        context - Context to use when running
        async - override default async behavior
      • getRollbackService

        public java.lang.String getRollbackService()
        Deprecated.
        Returns:
        The name of the service to run on rollback()
      • getRollbackContext

        public java.util.Map<java.lang.String,​? extends java.lang.Object> getRollbackContext()
        Deprecated.
        Returns:
        The context used when running the rollback() service
      • enlist

        public void enlist()
                    throws javax.transaction.xa.XAException
        Deprecated.
        Description copied from class: GenericXaResource
        Enlists this resource in the current transaction
        Overrides:
        enlist in class GenericXaResource
        Throws:
        javax.transaction.xa.XAException
      • commit

        public void commit​(javax.transaction.xa.Xid xid,
                           boolean onePhase)
                    throws javax.transaction.xa.XAException
        Deprecated.
        Specified by:
        commit in interface javax.transaction.xa.XAResource
        Specified by:
        commit in class GenericXaResource
        Throws:
        javax.transaction.xa.XAException
        See Also:
        XAResource.commit(javax.transaction.xa.Xid xid, boolean onePhase)
      • rollback

        public void rollback​(javax.transaction.xa.Xid xid)
                      throws javax.transaction.xa.XAException
        Deprecated.
        Specified by:
        rollback in interface javax.transaction.xa.XAResource
        Specified by:
        rollback in class GenericXaResource
        Throws:
        javax.transaction.xa.XAException
        See Also:
        XAResource.rollback(javax.transaction.xa.Xid xid)
      • prepare

        public int prepare​(javax.transaction.xa.Xid xid)
                    throws javax.transaction.xa.XAException
        Deprecated.
        Specified by:
        prepare in interface javax.transaction.xa.XAResource
        Overrides:
        prepare in class GenericXaResource
        Throws:
        javax.transaction.xa.XAException
      • runService

        protected final void runService​(java.lang.String service,
                                        java.util.Map<java.lang.String,​? extends java.lang.Object> context,
                                        boolean persist,
                                        int mode,
                                        int type)
                                 throws javax.transaction.xa.XAException
        Deprecated.
        Throws:
        javax.transaction.xa.XAException