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

Provide @CompensatedBy annotation

    XMLWordPrintable

Details

    • Task
    • Resolution: Obsolete
    • Major
    • 5.0.0.M5
    • None
    • Compensations
    • None

    Description

      For example, take this business logic:

          public class LifecycleImpl
          {
      
              @CompensatedBy(methodName="compensate1")
              public void doWork1()
              {
                   //Do work1
              }
      
              @CompensatedBy(methodName="compensate2")
              public void doWork2()
              {
                   //Do work2
              }
      
              public void compensate1()
              {
                   //Compensate work1
              }
      
              public void compensate2()
              {
                   //Compensate work2
              }
          }
      

      Here different compensation methods are specified for the business logic methods 'doWork1' and 'doWork2'. For each call to doWork1, there needs to be a compensation participant registered in that BA, configured with the right compensate method. I think a developer would expect one call of the corresponding compensate, per call to doWorkX. I think the developer would also expect some way of knowing what work they where compensating. For example, having matching parameters and values for the work and compensate methods would allow the compensate to know what it was compensating.

      This is not going to be trivial to implement as it will probably require some re-factoring to work.

      Attachments

        Issue Links

          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:

                Time Tracking

                  Estimated:
                  Original Estimate - 2 days
                  2d
                  Remaining:
                  Time Spent - 1 day, 4 hours Remaining Estimate - 4 hours
                  4h
                  Logged:
                  Time Spent - 1 day, 4 hours Remaining Estimate - 4 hours
                  1d 4h