Uploaded image for project: 'JBoss Transaction Manager'
  1. JBoss Transaction Manager
  2. JBTM-984

Support @Recover and @RecoverComplete annotations in the TXFramework

    XMLWordPrintable

Details

    Description

      LifecycleHandler classes can use the METHOD annotations @Recover and @RecoverComplete to perform recovery. @Recover's method should be called for each recovered object before allowing lifecycle processing to proceed for participants recovered from the log. The second method should be called once all recovered participants have completed, allowing the LifecycleHandler class to clear up records for transactions which were not resolved by recovery processing.
      The target method for an @Recover annotation should have void type and take a single argument which should be type-compatible with the type of any saved object.
      The target method for an @RecoverComplete annotation should have void type and take no arguments.

      The recovery mechanism which needs to reload saved objects and presents them back to the service class during recovery processing as a precursor to actually running lifecycle callbacks for recovered transactions. This is done through the Control interface:

      public interface TxControl
      {
          public String storeObject(Serializable object);
          public boolean deleteObject(String identifier);
      }
      

      Attachments

        Activity

          People

            paul.robinson@redhat.com Paul Robinson
            paul.robinson@redhat.com Paul Robinson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: