glassfish
  1. glassfish
  2. GLASSFISH-19319

bundles should get loaded in the same order that are initially deployed.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: not determined
    • Fix Version/s: None
    • Component/s: deployment, OSGi
    • Labels:
      None

      Description

      On contributing GLASSFISH-19215, I met a problem(or bug) related
      deployment.

      [Problem]
      I have three bundles called A, C, B, and B has a depedency on C and C
      has a dependency on A. That is to say, B→C→A. So,

      I deploy A, then deploy C, finally, deploy B.

      In alphabetical order, the following is arranged under
      domains/domain1/applications,

      A, B, C

      And in domain.xml, in <applications> tag, the following is arranged,

      A, C, B

      Then, I stop domain and re-start domain, while I am debuging, I found
      that the deployment order is A, B, C and this is not * right *, and
      right deployment order should be A, C, B the same as beginning deployment.

      This problem is very important for OSGi/CDI deployment scene, if not
      fixing it, a user's application will not work successfully.

        Activity

        Hide
        geraldingalls added a comment -

        The resolution of ties among applications with the same deployment-order attribute has been changed from using the application name to using the order that the applications were originally deployed.

        Show
        geraldingalls added a comment - The resolution of ties among applications with the same deployment-order attribute has been changed from using the application name to using the order that the applications were originally deployed.
        Hide
        Hong Zhang added a comment -

        Thanks for your feedback. We will look into restoring the original default.

        Show
        Hong Zhang added a comment - Thanks for your feedback. We will look into restoring the original default.
        Hide
        TangYong added a comment -

        [Sahoo Saying]
        Can't we set a compatibility mode to get the earlier ordering behavior?

        [Tang Saying]
        Although I think that deployment order should be fine(for example,
        meeting GLASSFISH-18805,...), just as sahoo said, I still wish to have a
        compatibility mode to get the earlier ordering behavior, the reason is
        as following:

        1 compatibility with 3.1.x

        2 I think that deployment order feature should be a optional feature,
        that is to say, while a user wants to change loading order of the
        application during server startup, he/she should use deployment order.
        Normally, I think that we should set a compatibility mode to get the
        earlier ordering behavior, and this way will be convenient for a user.

        Show
        TangYong added a comment - [Sahoo Saying] Can't we set a compatibility mode to get the earlier ordering behavior? [Tang Saying] Although I think that deployment order should be fine(for example, meeting GLASSFISH-18805 ,...), just as sahoo said, I still wish to have a compatibility mode to get the earlier ordering behavior, the reason is as following: 1 compatibility with 3.1.x 2 I think that deployment order feature should be a optional feature, that is to say, while a user wants to change loading order of the application during server startup, he/she should use deployment order. Normally, I think that we should set a compatibility mode to get the earlier ordering behavior, and this way will be convenient for a user.
        Hide
        TangYong added a comment -

        [Hong Saying]
        We recently added a feature called deployment order in GlassFish 4.0.
        You can look for more details in the draft deployment one pager I just
        published
        (https://wikis.oracle.com/display/GlassFish/GlassFish+4.0+Deployment+One+Pager).
        Basically user could now use a deploymentorder option to satisfy the
        dependency among applications. I think this should address your use case
        by you specifying appropriate numbers for these dependent applications
        during initial deployment.
        There is some behavior change for the default ordering as you and Sahoo
        pointed out. It used to be based on the initial deployment order, but
        now it's based on application names (for some other reason). As we did
        not officially publish the default ordering before, and now we have this
        deployment order feature, we think it will ok.. But let me know if you
        have any concerns.

        Show
        TangYong added a comment - [Hong Saying] We recently added a feature called deployment order in GlassFish 4.0. You can look for more details in the draft deployment one pager I just published ( https://wikis.oracle.com/display/GlassFish/GlassFish+4.0+Deployment+One+Pager ). Basically user could now use a deploymentorder option to satisfy the dependency among applications. I think this should address your use case by you specifying appropriate numbers for these dependent applications during initial deployment. There is some behavior change for the default ordering as you and Sahoo pointed out. It used to be based on the initial deployment order, but now it's based on application names (for some other reason). As we did not officially publish the default ordering before, and now we have this deployment order feature, we think it will ok.. But let me know if you have any concerns.
        Hide
        TangYong added a comment -

        [Sahoo Saying]
        This seems like a bug to me. I thought the bundles get loaded in the
        same order that are initially deployed.

        In any case, an OSGi bundle should not assume a certain deployment
        order. It should use things like "timeout" to handle such situations.

        In addition, file under deployment subcat and it will go to Hong's queue.

        Show
        TangYong added a comment - [Sahoo Saying] This seems like a bug to me. I thought the bundles get loaded in the same order that are initially deployed. In any case, an OSGi bundle should not assume a certain deployment order. It should use things like "timeout" to handle such situations. In addition, file under deployment subcat and it will go to Hong's queue.

          People

          • Assignee:
            geraldingalls
            Reporter:
            TangYong
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: