ServiceMix
  1. ServiceMix
  2. SM-1607

JBI container should be able to initialize all SAs first and then start them

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.2
    • Fix Version/s: 3.3.1
    • Component/s: servicemix-core
    • Labels:
      None

      Description

      This issue is related to issue SM-1554

      1. sm1607.txt
        3 kB
        Jamie goodyear
      2. sm1607b.txt
        4 kB
        Jamie goodyear

        Issue Links

          Activity

          Hide
          Jamie goodyear added a comment -

          See attached file 'sm1607.txt'.

          This is my first attempt at resolving this issue, so please review before trying this one out.

          The basics of this patch includes having the Deployment Service start method internally initializes all SAs. To facilitate this the Service Assembly Life Cycle is updated to include an init method that handles initializing the assembly's SUs.

          The Deployment Test is updated to accommodate a verification issue that occurs with EasyMocks during testing.

          Show
          Jamie goodyear added a comment - See attached file 'sm1607.txt'. This is my first attempt at resolving this issue, so please review before trying this one out. The basics of this patch includes having the Deployment Service start method internally initializes all SAs. To facilitate this the Service Assembly Life Cycle is updated to include an init method that handles initializing the assembly's SUs. The Deployment Test is updated to accommodate a verification issue that occurs with EasyMocks during testing.
          Hide
          Guillaume Nodet added a comment -

          Two comments:

          • I think there is a problem when the SA is restored to a stopped state. The SU will be initialized twice, once from the call to sa.init() and another one from the call to sa.restore()
          • I also think the broker should be suspended before the SA are initialized
          Show
          Guillaume Nodet added a comment - Two comments: I think there is a problem when the SA is restored to a stopped state. The SU will be initialized twice, once from the call to sa.init() and another one from the call to sa.restore() I also think the broker should be suspended before the SA are initialized
          Hide
          Jamie goodyear added a comment -

          See attached file 'sm1607b.txt'.

          This is my second attempt at resolving this issue, so please review before trying this one out.

          The basics of this patch includes having the Deployment Service start method internally initializes all SAs. To facilitate this the Service Assembly Life Cycle is updated to include an init method that handles initializing the assembly's SUs.

          I've included updates to handle the two issues Guillaume noted. I now suspend the broker before initializing any SAs, secondly I have modified the restore call to specify if a forceInit is required for SUs (the original behavior is maintained by restore() signature).

          No modifications are required to the DeploymentTests using this patch.

          Show
          Jamie goodyear added a comment - See attached file 'sm1607b.txt'. This is my second attempt at resolving this issue, so please review before trying this one out. The basics of this patch includes having the Deployment Service start method internally initializes all SAs. To facilitate this the Service Assembly Life Cycle is updated to include an init method that handles initializing the assembly's SUs. I've included updates to handle the two issues Guillaume noted. I now suspend the broker before initializing any SAs, secondly I have modified the restore call to specify if a forceInit is required for SUs (the original behavior is maintained by restore() signature). No modifications are required to the DeploymentTests using this patch.
          Hide
          Guillaume Nodet added a comment -

          Sending servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/DeploymentService.java
          Sending servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceAssemblyLifeCycle.java
          Transmitting file data ..
          Committed revision 725284.

          Thanks a lot Jamie for this patch.

          I haven't backported this fix to 3.2 branch because it does not make any sense.
          This fix is related to the change in the endpoint lifefycle that occured in all components for 3.3, so in 3.2, endpoints are activated while SUs are started.
          Therefore, the behavior would not be changed in 3.2.

          Show
          Guillaume Nodet added a comment - Sending servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/DeploymentService.java Sending servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/ServiceAssemblyLifeCycle.java Transmitting file data .. Committed revision 725284. Thanks a lot Jamie for this patch. I haven't backported this fix to 3.2 branch because it does not make any sense. This fix is related to the change in the endpoint lifefycle that occured in all components for 3.3, so in 3.2, endpoints are activated while SUs are started. Therefore, the behavior would not be changed in 3.2.

            People

            • Assignee:
              Guillaume Nodet
              Reporter:
              Ron Gavlin
            • Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development