Class JmsXAResourceRecoveryHelper

    • Field Summary

      • 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 
      Modifier and Type Method Description
      void commit​(javax.transaction.xa.Xid xid, boolean onePhase)
      Delegates XAResource#commit call to the connected JMS resource.
      void end​(javax.transaction.xa.Xid xid, int flag)
      Delegates XAResource#end call to the connected JMS resource.
      void forget​(javax.transaction.xa.Xid xid)
      Delegates XAResource#forget call to the connected JMS resource.
      int getTransactionTimeout()
      Delegates XAResource#getTransactionTimeout call to the connected JMS resource.
      javax.transaction.xa.XAResource[] getXAResources()
      If JMS connection was created successfully, returns an array with one instance of JmsXAResourceRecoveryHelper.
      boolean initialise​(java.lang.String properties)
      Nothing to initialise.
      boolean isSameRM​(javax.transaction.xa.XAResource xaResource)
      Delegates XAResource#isSameRM call to the connected JMS resource.
      int prepare​(javax.transaction.xa.Xid xid)
      Delegates XAResource#prepare call to the connected JMS resource.
      javax.transaction.xa.Xid[] recover​(int flag)
      Delegates XAResource#recover call to the connected JMS resource.
      void rollback​(javax.transaction.xa.Xid xid)
      Delegates XAResource#rollback call to the connected JMS resource.
      boolean setTransactionTimeout​(int seconds)
      Delegates XAResource#setTransactionTimeout call to the connected JMS resource.
      void start​(javax.transaction.xa.Xid xid, int flag)
      Delegates XAResource#start call to the connected JMS resource.
      • Methods inherited from class java.lang.Object

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

      • JmsXAResourceRecoveryHelper

        public JmsXAResourceRecoveryHelper​(javax.jms.XAConnectionFactory xaConnectionFactory)
      • JmsXAResourceRecoveryHelper

        public JmsXAResourceRecoveryHelper​(javax.jms.XAConnectionFactory xaConnectionFactory,
                                           java.lang.String user,
                                           java.lang.String pass)
      • JmsXAResourceRecoveryHelper

        public JmsXAResourceRecoveryHelper​(ConnectionManager connectionManager)
    • Method Detail

      • initialise

        public boolean initialise​(java.lang.String properties)
        Nothing to initialise.
        Specified by:
        initialise in interface XAResourceRecoveryHelper
        Parameters:
        properties -
        Returns:
        Always returns true
      • getXAResources

        public javax.transaction.xa.XAResource[] getXAResources()
        If JMS connection was created successfully, returns an array with one instance of JmsXAResourceRecoveryHelper. Otherwise, returns an empty array.
        Specified by:
        getXAResources in interface XAResourceRecoveryHelper
        Returns:
        Array with one instance of JmsXAResourceRecoveryHelper or an empty array
      • recover

        public javax.transaction.xa.Xid[] recover​(int flag)
                                           throws javax.transaction.xa.XAException
        Delegates XAResource#recover call to the connected JMS resource. If provided argument is XAResource.TMENDRSCAN, then JMS connection will be closed at the end of the call.
        Specified by:
        recover in interface javax.transaction.xa.XAResource
        Parameters:
        flag -
        Throws:
        javax.transaction.xa.XAException
      • start

        public void start​(javax.transaction.xa.Xid xid,
                          int flag)
                   throws javax.transaction.xa.XAException
        Delegates XAResource#start call to the connected JMS resource.
        Specified by:
        start in interface javax.transaction.xa.XAResource
        Parameters:
        xid -
        flag -
        Throws:
        javax.transaction.xa.XAException
      • end

        public void end​(javax.transaction.xa.Xid xid,
                        int flag)
                 throws javax.transaction.xa.XAException
        Delegates XAResource#end call to the connected JMS resource.
        Specified by:
        end in interface javax.transaction.xa.XAResource
        Parameters:
        xid -
        flag -
        Throws:
        javax.transaction.xa.XAException
      • prepare

        public int prepare​(javax.transaction.xa.Xid xid)
                    throws javax.transaction.xa.XAException
        Delegates XAResource#prepare call to the connected JMS resource.
        Specified by:
        prepare in interface javax.transaction.xa.XAResource
        Parameters:
        xid -
        Returns:
        Prepare outcome
        Throws:
        javax.transaction.xa.XAException
      • commit

        public void commit​(javax.transaction.xa.Xid xid,
                           boolean onePhase)
                    throws javax.transaction.xa.XAException
        Delegates XAResource#commit call to the connected JMS resource.
        Specified by:
        commit in interface javax.transaction.xa.XAResource
        Parameters:
        xid -
        onePhase -
        Throws:
        javax.transaction.xa.XAException
      • rollback

        public void rollback​(javax.transaction.xa.Xid xid)
                      throws javax.transaction.xa.XAException
        Delegates XAResource#rollback call to the connected JMS resource.
        Specified by:
        rollback in interface javax.transaction.xa.XAResource
        Parameters:
        xid -
        Throws:
        javax.transaction.xa.XAException
      • isSameRM

        public boolean isSameRM​(javax.transaction.xa.XAResource xaResource)
                         throws javax.transaction.xa.XAException
        Delegates XAResource#isSameRM call to the connected JMS resource.
        Specified by:
        isSameRM in interface javax.transaction.xa.XAResource
        Parameters:
        xaResource -
        Returns:
        True if is same resource manager or false if not.
        Throws:
        javax.transaction.xa.XAException
      • forget

        public void forget​(javax.transaction.xa.Xid xid)
                    throws javax.transaction.xa.XAException
        Delegates XAResource#forget call to the connected JMS resource.
        Specified by:
        forget in interface javax.transaction.xa.XAResource
        Parameters:
        xid -
        Throws:
        javax.transaction.xa.XAException
      • getTransactionTimeout

        public int getTransactionTimeout()
                                  throws javax.transaction.xa.XAException
        Delegates XAResource#getTransactionTimeout call to the connected JMS resource.
        Specified by:
        getTransactionTimeout in interface javax.transaction.xa.XAResource
        Returns:
        Transaction timeout value.
        Throws:
        javax.transaction.xa.XAException
      • setTransactionTimeout

        public boolean setTransactionTimeout​(int seconds)
                                      throws javax.transaction.xa.XAException
        Delegates XAResource#setTransactionTimeout call to the connected JMS resource.
        Specified by:
        setTransactionTimeout in interface javax.transaction.xa.XAResource
        Parameters:
        seconds -
        Returns:
        True if transaction timeout was set, or false if wasn't.
        Throws:
        javax.transaction.xa.XAException