Tuscany
  1. Tuscany
  2. TUSCANY-3998

Provide a way to override Tuscany "system" definition.xml documents

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: Java-SCA-2.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      A Tuscany embedder may need to change certain system definitions, e.g. a bindingType or an implementationType.

      System definitions are found using the ServiceDiscovery mechanism. DefaultDefinitionsExtensionPoint looks for jars/bundles that have a META-INF/services/org.apache.tuscany.sca.definitions.xml.Definitions file.

      definitionsDeclarations = registry.getServiceDiscovery().getServiceDeclarations(DEFINITIONS_FILE);

      This collects all definitions documents in the runtime. There is no way to override one definitions document with another.

      I am attaching a patch to address this. It changes the getServiceDeclarations() call to get declarations in ranked order. When processing the returned declarations, it now processes only the first resource with a given path.

      The embedder's service declaration must use the same resource name as the Tuscany definition it replaces and it must have a higher ranking attribute.

        Activity

        ant elder made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Greg Dritschler made changes -
        Attachment TUSCANY-3998-revised.patch [ 12507721 ]
        Greg Dritschler made changes -
        Attachment TUSCANY-3998.patch [ 12507639 ]
        Greg Dritschler made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        ant elder made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        ant elder made changes -
        Assignee ant elder [ aelder ]
        Greg Dritschler made changes -
        Attachment TUSCANY-3998.patch [ 12507639 ]
        Greg Dritschler made changes -
        Attachment TUSCANY-3998.patch [ 12507638 ]
        Greg Dritschler made changes -
        Field Original Value New Value
        Attachment TUSCANY-3998.patch [ 12507638 ]
        Greg Dritschler created issue -

          People

          • Assignee:
            ant elder
            Reporter:
            Greg Dritschler
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development